Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SebastianBodza
SebastianBodza / parse_ilias.py
Last active December 23, 2024 23:35
parse ilias multiple choice
import xml.etree.ElementTree as ET
import pandas as pd
import base64
import re
def clean_text(text):
if text is None:
return ""
text = re.sub(r'<[^>]+>', ' ', text)
text = re.sub(r'\s+', ' ', text)
@SebastianBodza
SebastianBodza / modeling_mixtral.py
Created May 5, 2024 07:17 — forked from kalomaze/modeling_mixtral.py
Fixed Mixtral training code for HF Transformers
# coding=utf-8
# Copyright 2023 Mixtral AI and the HuggingFace Inc. team. All rights reserved.
#
# This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX
# and OPT implementations in this library. It has been modified from its
# original forms to accommodate minor architectural differences compared
# to GPT-NeoX and OPT used by the Meta AI team that trained the model.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.