user commited on
Commit ·
cf4a7ae
1
Parent(s): b0c747c
Improve README
Browse filesFiles changed (2)
- Quality.svgAdded
- README.md+195-40
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960---library_name: transformersbase_model: agentlans/multilingual-e5-small-alignedtags:- generated_from_trainermodel-index:- name: multilingual-e5-small-aligned-quality-20241214-newresults: []---<!-- This model card has been generated automatically according to the information the Trainer had access to. Youshould probably proofread and complete it, then remove this comment. --># multilingual-e5-small-aligned-quality-20241214-newThis model is a fine-tuned version of [agentlans/multilingual-e5-small-aligned](https://huggingface.co/agentlans/multilingual-e5-small-aligned) on an unknown dataset.It achieves the following results on the evaluation set:- Loss: 0.1958- Mse: 0.1958## Model descriptionMore information needed## Intended uses & limitationsMore information needed## Training and evaluation dataMore information needed## Training procedure### Training hyperparametersThe following hyperparameters were used during training:- learning_rate: 5e-05- train_batch_size: 128- eval_batch_size: 8- seed: 42- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments- lr_scheduler_type: linear- num_epochs: 3.0### Training results| Training Loss | Epoch | Step | Validation Loss | Mse ||:-------------:|:-----:|:-----:|:---------------:|:------:|| 0.2436 | 1.0 | 7813 | 0.2296 | 0.2296 || 0.1927 | 2.0 | 15626 | 0.2079 | 0.2079 || 0.1615 | 3.0 | 23439 | 0.1958 | 0.1958 |### Framework versions- Transformers 4.46.3- Pytorch 2.5.1+cu124- Datasets 3.1.0- Tokenizers 0.20.3123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215---license: mitlanguage:- multilingual- af- am- ar- as- az- be- bg- bn- br- bs- ca- cs- cy- da- de- el- en- eo- es- et- eu- fa- fi- fr- fy- ga- gd- gl- gu- ha- he- hi- hr- hu- hy- id- is- it- ja- jv- ka- kk- km- kn- ko- ku- ky- la- lo- lt- lv- mg- mk- ml- mn- mr- ms- my- ne- nl- 'no'- om- or- pa- pl- ps- pt- ro- ru- sa- sd- si- sk- sl- so- sq- sr- su- sv- sw- ta- te- th- tl- tr- ug- uk- ur- uz- vi- xh- yi- zhdatasets:- agentlans/en-translationsbase_model:- agentlans/multilingual-e5-small-alignedpipeline_tag: text-classificationtags:- multilingual- quality-assessment---# multilingual-e5-small-aligned-qualityThis model is a fine-tuned version of [agentlans/multilingual-e5-small-aligned](https://huggingface.co/agentlans/multilingual-e5-small-aligned) designed for assessing text quality across multiple languages.## Key Features- Multilingual support- Quality assessment for text- Based on E5 small model architecture## Intended Uses & LimitationsThis model is intended for:- Assessing the quality of multilingual text- Filtering multilingual content- Comparative analysis of corpus text quality across different languagesLimitations:- Performance may vary for languages not well-represented in the training data- Should not be used as the sole criterion for quality assessment## Usage Example```pythonfrom transformers import AutoTokenizer, AutoModelForSequenceClassificationimport torchmodel_name = "agentlans/multilingual-e5-small-aligned-quality"# Initialize tokenizer and modeltokenizer = AutoTokenizer.from_pretrained(model_name)model = AutoModelForSequenceClassification.from_pretrained(model_name)device = torch.device("cuda" if torch.cuda.is_available() else "cpu")model = model.to(device)def quality(text):"""Assess the quality of the input text."""inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True).to(device)with torch.no_grad():logits = model(**inputs).logits.squeeze().cpu()return logits.tolist()# Example usagescore = quality("Your text here.")print(f"Quality score: {score}")```## Performance ResultsThe model was evaluated on a diverse set of multilingual text samples:- 10 English text samples of varying quality were translated into Arabic, Chinese, French, Russian, and Spanish.- The model demonstrated consistent quality assessment across different languages for the same text.<details><summary>The following table presents the 10 original texts along with their translations:</summary>|Text |English |French |Spanish |Chinese |Russian |Arabic ||:----|:-------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------||A |Discover the secret to eternal youth with our revolutionary skincare product! |Découvrez le secret de la jeunesse éternelle avec notre produit de soin révolutionnaire ! |¡Descubre el secreto de la eterna juventud con nuestro revolucionario producto de cuidado de la piel! |使用我们革命性的护肤产品发现永葆青春的秘密! |Откройте для себя секрет вечной молодости с нашим революционным средством по уходу за кожей! |اكتشف سر الشباب الأبدي مع منتجنا الثوري للعناية بالبشرة! ||B |Get rich quick with our foolproof investment strategy - no experience needed! |Devenez riche rapidement grâce à notre stratégie d’investissement infaillible – aucune expérience n’est requise ! |Hazte rico rápidamente con nuestra estrategia de inversión infalible: ¡no necesitas experiencia! |利用我们万无一失的投资策略快速致富 - 无需经验! |Быстро разбогатейте с нашей надежной инвестиционной стратегией — опыт не требуется! |احصل على الثراء السريع مع استراتيجية الاستثمار الموثوقة لدينا - لا حاجة للخبرة! ||C |Earn money from home by participating in online surveys - sign up today! |Gagnez de l'argent depuis chez vous en participant à des sondages en ligne - inscrivez-vous dès aujourd'hui ! |Gana dinero desde casa participando en encuestas online: ¡regístrate hoy! |通过参与在线调查在家赚钱 - 今天就注册! |Зарабатывайте деньги из дома, участвуя в онлайн-опросах — зарегистрируйтесь сегодня! |اكسب المال من المنزل عن طريق المشاركة في الاستطلاعات عبر الإنترنت - سجل اليوم! ||D |Congratulations! You've won a $1,000 gift card! Click here to claim your prize! |Félicitations ! Vous avez gagné une carte-cadeau de 1 000 $ ! Cliquez ici pour réclamer votre prix ! |¡Felicitaciones! ¡Ganaste una tarjeta de regalo de $1,000! ¡Haz clic aquí para reclamar tu premio! |恭喜!您赢了一张价值 1,000 美元的礼品卡!单击此处领取您的奖品! |Поздравляем! Вы выиграли подарочную карту на $1000! Нажмите здесь, чтобы получить свой приз! |مبروك! لقد فزت ببطاقة هدايا بقيمة 1000 دولار! انقر هنا للحصول على جائزتك! ||E |Act now! Limited time offer on miracle weight loss pills! |Agissez maintenant ! Offre à durée limitée sur les pilules amaigrissantes miracles ! |¡Actúe ahora! ¡Oferta por tiempo limitado en píldoras milagrosas para bajar de peso! |立即行动!神奇减肥药限时优惠! |Действуйте сейчас! Ограниченное по времени предложение на чудодейственные таблетки для похудения! |تصرف الآن! عرض لفترة محدودة على حبوب إنقاص الوزن المعجزة! ||F |Your computer is infected! Click here for a free scan and fix your issues now! |Votre ordinateur est infecté ! Cliquez ici pour une analyse gratuite et corrigez vos problèmes dès maintenant ! |¡Su computadora está infectada! Haga clic aquí para obtener un análisis gratuito y solucionar sus problemas ahora. |您的计算机已感染病毒!点击此处进行免费扫描并立即修复您的问题! |Ваш компьютер заражен! Нажмите здесь для бесплатного сканирования и устранения проблем прямо сейчас! |جهاز الكمبيوتر الخاص بك مصاب! انقر هنا لإجراء فحص مجاني وإصلاح المشكلات التي تواجهك الآن! ||G |Unlock the secrets of the universe with our exclusive online astronomy course! |Découvrez les secrets de l'univers avec notre cours d'astronomie en ligne exclusif ! |¡Descubre los secretos del universo con nuestro exclusivo curso de astronomía online! |通过我们独家的在线天文学课程揭开宇宙的秘密! |Откройте тайны Вселенной с нашим эксклюзивным онлайн-курсом астрономии! |اكتشف أسرار الكون مع دورتنا الفلكية الحصرية عبر الإنترنت! ||H |The Eiffel Tower can be 15 cm taller during the summer due to thermal expansion. |La tour Eiffel peut être plus haute de 15 cm en été en raison de la dilatation thermique. |La Torre Eiffel puede ser 15 cm más alta durante el verano debido a la expansión térmica. |由于热膨胀,埃菲尔铁塔在夏季可能会高出 15 厘米。 |Летом Эйфелева башня может стать на 15 см выше из-за теплового расширения. |يمكن أن يزيد ارتفاع برج إيفل بمقدار 15 سم خلال فصل الصيف بسبب التمدد الحراري. ||I |Did you know? The average person spends 6 years of their life dreaming. |Le saviez-vous ? En moyenne, une personne passe 6 ans de sa vie à rêver. |¿Sabías que una persona promedio pasa 6 años de su vida soñando? |你知道吗?每个人一生中平均有 6 年的时间在做梦。 |Знаете ли вы? В среднем человек тратит 6 лет своей жизни на мечты. |هل تعلم؟ يقضي الشخص العادي 6 سنوات من حياته في الأحلام. ||J |Did you know that honey never spoils? Archaeologists have found pots of honey in ancient Egyptian tombs that are over 3,000 years old and still edible. |Saviez-vous que le miel ne périme jamais ? Des archéologues ont découvert dans d'anciennes tombes égyptiennes des pots de miel datant de plus de 3 000 ans et toujours comestibles. |¿Sabías que la miel nunca se estropea? Los arqueólogos han encontrado tarros de miel en tumbas del antiguo Egipto que tienen más de 3000 años y aún son comestibles. |你知道蜂蜜是不会变质的吗?考古学家在古埃及墓穴中发现了已有 3000 多年历史的蜂蜜罐,至今仍可食用。 |Знаете ли вы, что мед никогда не портится? Археологи нашли в древнеегипетских гробницах горшки с медом, которым более 3000 лет, и которые до сих пор съедобны. |هل تعلم أن العسل لا يفسد أبدًا؟ لقد عثر علماء الآثار على أواني عسل في مقابر مصرية قديمة يزيد عمرها عن 3000 عام ولا تزال صالحة للأكل. |</details><img src="Quality.svg" alt="Scatterplot of predicted quality scores grouped by text sample and language" width="100%"/>## Training DataThe model was trained on the [Multilingual Parallel Sentences dataset](https://huggingface.co/datasets/agentlans/en-translations), which includes:- Parallel sentences in English and various other languages- Semantic similarity scores calculated using LaBSE- Additional quality metrics- Sources: JW300, Europarl, TED Talks, OPUS-100, Tatoeba, Global Voices, and News Commentary## Training Procedure### Hyperparameters- Learning rate: 5e-05- Train batch size: 128- Eval batch size: 8- Seed: 42- Optimizer: AdamW (betas=(0.9,0.999), epsilon=1e-08)- Learning rate scheduler: Linear- Number of epochs: 3.0### Training Results| Epoch | Training Loss | Validation Loss | MSE ||-------|---------------|-----------------|--------|| 1.0 | 0.2436 | 0.2296 | 0.2296 || 2.0 | 0.1927 | 0.2079 | 0.2079 || 3.0 | 0.1615 | 0.1958 | 0.1958 |## Framework Versions- Transformers: 4.46.3- PyTorch: 2.5.1+cu124- Datasets: 3.1.0- Tokenizers: 0.20.3
Quality.svgAdded
README.md+195-40