Skip to content

Commit

Permalink
fix #5768
Browse files Browse the repository at this point in the history
  • Loading branch information
hiyouga authored Oct 22, 2024
1 parent ed9b99b commit d155b70
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/llamafactory/extras/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os
from collections import OrderedDict, defaultdict
from enum import Enum
from typing import Dict, Optional
Expand Down Expand Up @@ -47,7 +48,7 @@

IGNORE_INDEX = -100

IMAGE_PLACEHOLDER = "<image>"
IMAGE_PLACEHOLDER = os.environ.get("IMAGE_PLACEHOLDER", "<image>")

LAYERNORM_NAMES = {"norm", "ln"}

Expand Down Expand Up @@ -95,7 +96,7 @@

SUPPORTED_CLASS_FOR_S2ATTN = {"llama"}

VIDEO_PLACEHOLDER = "<video>"
VIDEO_PLACEHOLDER = os.environ.get("VIDEO_PLACEHOLDER", "<video>")

V_HEAD_WEIGHTS_NAME = "value_head.bin"

Expand Down

0 comments on commit d155b70

Please sign in to comment.