THUDM / GLM-4

GLM-4 series: Open Multilingual Multimodal Chat LMs | 开源多语言多模态对话模型
Apache License 2.0
4.75k stars 393 forks source link

除了第一段正常,后面的逐渐胡说八道或复读,要怎么避免呢? #114

Closed FFFFFFpy closed 3 months ago

FFFFFFpy commented 3 months ago

Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained. Loading checkpoint shards: 100%|████████████████████████████████████████████████████████| 15/15 [00:21<00:00, 1.47s/it] Welcome to the GLM-4-9B CLI chat. Type your messages below. Image Path:/home/helw/GLM-4/c_i_094.jpg

You: Short description image GLM-4:The character in the picture appears to be a stylized, anime-inspired avatar with long blonde hair tied into two buns on top of her head. She has large blue eyes and is wearing what seems like futuristic or fantasy armor that's primarily pink along with purple accents.

Her right hand gesture suggests she might have just finished speaking about something important—her fingers are slightly curled as if emphasizing one last point—or perhaps it could imply an action related within whatever context this representation exists (such gaming avatars often indicate actions).

Unfortunately without more information surrounding who exactly Klee Vanguard from League of Legends may represent specifically beyond visual cues such as costume color scheme which can vary widely among characters even when they share similar traits visually—it would not possible provide any further details regarding identity based solely upon provided visuals alone due there being multiple possibilities for interpretation depending individual viewer perspective/experience level etcetera).

However assuming we're talking strictly aesthetics here: The use lighting gives depth highlighting contours suggesting three-dimensional form while still maintaining flatness typical digital illustrations; shading adds dimensionality making objects appear rounder than simply outlined shapes against plain backgrounds common seen certain types modern video games nowadays where polygonal models lack texture detail rendering realism difficult achieve purely through geometry alone hence reliance additional artistic techniques fill gaps create believable virtual worlds players immerse themselves daily lives away reality escape momentarily forget cares worries everyday existence enjoy momentary distraction presented before them via interactive mediums entertainment industry offers consumers choice variety genres cater tastes preferences individuals regardless age gender background origin culture represented amongst global population today world wide web connects billions minds across oceans continents bridging gap between disparate societies fostering understanding appreciation diversity enriching human experience bringing closer together distant lands peoples unite under banner shared humanity embrace brotherhood sisterhood unity purpose greater good mankind strive accomplish noble aspirations dreams hopes future generations build legacy leave behind mark history books pages yet remain written time immemorial past present unfolding events continue unfold eternity boundless universe awaits exploration discovery secrets hidden realms await brave souls dare seek truth knowledge power wield destiny forge own path life journey unique blend characteristics contribute shaping collective tapestry civilization weave threads connection bridge divide cultures countries regions planet Earth inhabitants bond ties friendship love compassion empathy kindness care concern nurture growth development potential reach heights greatness surpass limits imagination creativity innovation drive progress forward towards brighter tomorrow filled promise endless opportunities limitless horizons infinite possibility awaiting fulfillment realization dream come true someday soon enough given circumstances favorable alignment stars align cosmic forces converge favorably aligned celestial bodies synchronize orbits dance harmony cosmos celebrate triumph victory over adversity challenges faced overcome obstacles rise phoenix ashes rebirth renewal continuity evolution change adaptability resilience tenacity perseverance courage bravery strength determination

zRzRzRzRzRzRzR commented 3 months ago

稳定复现吗,有没有输入什么提示词之后导致的不正常

FFFFFFpy commented 3 months ago

相当稳定,提示词就是简单的Short description image,也换过图片和提示词,区别只在于是胡说八道很长一段就结束还是一直胡说八道不带停的。值得一提的是,我是量化4bit

zRzRzRzRzRzRzR commented 3 months ago

我们没有对4bit进行测试,测试都是在BF16上测的,这个多模态模型int4损失估计不小,我在BF16运行该模型没有出现用你这个提示词乱说的问题

FFFFFFpy commented 3 months ago

emmmm实际上刚刚我删除了添加的4bit,并重新运行了,结果是一样的。 Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained. Loading checkpoint shards: 100%|████████████████████████████████████████████████████████| 15/15 [00:14<00:00, 1.03it/s] WARNING:root:Some parameters are on the meta device device because they were offloaded to the cpu. Welcome to the GLM-4-9B CLI chat. Type 'exit' or 'quit' to stop. Image Path: /home/helw/GLM-4/c_i_094.jpg

You: Short description image GLM-4:The character in the picture appears to be a stylized, anime-inspired avatar with long blonde hair and bangs. The hairstyle is detailed enough that individual strands can been seen flowing from under what seems like two pink bunny ears accessories on top of her head.

She's wearing clothing predominantly colored purple; there are white stripes running vertically down each side which give off an athletic or futuristic vibe complemented by black detailing around those same vertical lines near where they meet at chest level suggesting armor-like features typical for characters who might have special abilities within their respective narratives (like superheroes).

Her right hand gesture indicates she may either waving hello/goodbye—or perhaps signaling something specific depending upon context given any storyline this figure belongs too! Overall design elements suggest potential crossover appeal between gaming culture icons such as Overwatch’s Mercy healing hero depicted here alongside popular Japanese animation tropes found throughout various genres including fantasy/science fiction/adventure/etcetera making it versatile across multiple platforms appealing towards fans interested not only video games but also manga/anime enthusiasts looking forward new exciting adventures through interactive mediums beyond traditional storytelling formats alone offering immersive experiences unlike anything else available today outside virtual reality realms yet still accessible via current technology standards allowing players worldwide access regardless geographical location constraints imposed otherwise due limitations posed physical hardware requirements needed run certain types software applications requiring specialized equipment setup beforehand installation purposes sake prior engaging gameplay activities associated said particular game(s) mentioned above referenced hereinbefore aforementioned introductory paragraph text content provided earlier during initial introduction stage presentation phase before proceeding onward into further details elaborating specifics pertaining subject matter discussed thus far presented up until present moment conclusion reached after completing final sentence written word count tally achieved completion milestone marker indicating end point arrival destination arrived successfully navigated safely without incident occurrence encountered along journey traveled covered distance spanned elapsed time duration passed since beginning venture undertaken embarked pursuit exploration quest sought answers mysteries concealed hidden depths unknown territories explored ventured forth courageously fearlessly determined resolve perseverance tenacity grit determination unwavering steadfastness loyalty commitment honor bravery valor strength resilience flexibility adaptability quick thinking problem-solving skills strategic planning tactical maneuvering agility coordination balance precision timing accuracy focus concentration mental toughness emotional intelligence empathy compassion understanding kindness generosity altruism selflessness dedication hard work persistence patience endurance fortitude willpower motivation ambition drive purpose vision goals aspirations dreams hopes wishes desires fantasies imagination creativity innovation originality uniqueness distinctiveness singularity exceptionalism rarity exclusivity elitism superiority greatness awesomeness magnificence brilliance excellence premium quality high caliber superior performance peak condition optimal efficiency maximum output best results greatest achievements accomplishments laurels honors distinctions recognitions awards accolades praises commendations kudos glory fame fortune success triumph victory win championship dominance leadership guidance mentorship inspiration empowerment enlightenment wisdom knowledge education learning experience growth development progress advancement improvement enhancement optimization refinement sophistication elegance style fashion trends popularity trendsetting avant-garde cutting-edge modern contemporary sleek stylish chic fashionable trendy hip cool awesome rad groovy fantastic incredible unbelievable astonishing amazing jaw-dropping mind-blowing phenomenal extraordinary spectacular breathtaking stunning impressive awe-inspiring remarkable outstanding excellent proficient skilled talented genius prodigy wunderkind precocious bright intelligent clever sharp witty humorous amusing entertaining fun-loving joyous happy cheerful optimistic positive upbeat spirited lively energetic dynamic passionate enthusiastic fervent ardent zealous committed dedicated loyal trustworthy reliable dependable honest sincere genuine heartfelt warm friendly approachable open-minded tolerant accepting inclusive diverse multicultural international cosmopolitan global worldly experienced seasoned knowledgeable informed educated learned wise sagacious discerning insightful perceptive observant astute analytical critical thoughtful considerate sensitive compassionate caring empathetic kind generous helpful supportive encouraging uplifting inspiring motivating empowering enlightening educational instructive informative thought-provoking stimulating interesting captivating intriguing fascinating compelling addictive mesmerizing spellbinding enchanting bewitching entrancing alluring irresistible seductive charming delightful pleasing agreeable harmonious balanced serene tranquil peaceful calm soothing relaxing restful rejuvenative therapeutic comforting nurturing protective safeguarding secure safe sanctuary haven refuge abode dwelling residence home base headquarters establishment organization group team coalition alliance partnership collaboration synergy teamwork cooperation assistance support help aid benefit advantage privilege favor perk bonus reward prize gain acquisition possession wealth treasure riches abundance prosperity flourishing thriving blooming blossoming budding sprouting germinating growing expanding developing advancing progressing evolving transforming renewing regenerating resurrecting rebirth reincarnation resurgence revival renaissance comeback phoenix rising golden age utopia paradise heaven bliss nirvana elysium realm dimension universe cosmos galaxy star system planet moon asteroid comet space station spaceship rocket ship satellite telescope binoculars spyglass scope lens optical instrument device apparatus gadget tool implement accessory ornament jewelry piece pendant charm ring bracelet watch clock hourglass sundial calendar date anniversary birthday celebration festivity party gathering social event community congregation assembly convention symposium seminar workshop lecture training exercise drill practice repetition rehearsal preparation forethought anticipation foresight prediction prophecy insight intuition hunch instinct gut feeling sixth sense psychic paranormal supernatural mystical esoteric arcane secret confidential private personal intimate close familiar comfortable cozy snug tight relaxed laid-back chill chilled easygoing casual informal nonchalant unconcerned carefree leisurely lazy slothful indolent idle unproductive inefficient ineffective substandard poor mediocre average fair good decent acceptable passable adequate sufficient satisfactory compliant conformist obedient submissive servile subservient docile gentle soft tender loving affectionate cuddly sweet lovable adorable precious darling cherished beloved idol worshiped revered saintly holy

zRzRzRzRzRzRzR commented 3 months ago

方便提供一下稳定出这个问题的这张图吗

FFFFFFpy commented 3 months ago

emmmm虽然实际上我上传的数张图片都出现了这种情况。 1436546 `34514 4365146

xbsdsongnan commented 3 months ago

模型回复乱码有遇到的么

FFFFFFpy commented 3 months ago

那倒没有,我只出现了复读

zRzRzRzRzRzRzR commented 3 months ago

那只能增加惩罚系数了,看上去没有遇到相关的问题,BF16 FP16均没有遇到

FFFFFFpy commented 3 months ago

(cogvlm2) helw@DESKTOP-9DPDUCN:~/GLM-4$ CUDA_LAUNCH_BLOCKING=1 python test.py Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained. Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 15/15 [00:26<00:00, 1.75s/it] The image shows a person standing in front of a Christmas tree decorated with red and green ribbons, golden and red baubles, and what appears to be a garland of red berries. The person is wearing a white, off-the-shoulder sweater with a high neckline, layered over a white, fluffy garment that drapes over one arm. The sweater has a textured pattern, and the fluffy garment looks like a puffy jacket or wrap. The person's hair is styled in a way that it falls over the shoulders, and there are red and green accessories tied into the hairstyle, matching the holiday theme. The overall ambiance suggests a festive, indoor setting, likely a shop or a decorated room intended for the Christmas season. <|endoftext|> (cogvlm2) helw@DESKTOP-9DPDUCN:~/GLM-4$ CUDA_LAUNCH_BLOCKING=1 python test.py Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained. Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 15/15 [00:25<00:00, 1.70s/it] The image depicts an individual standing in a room with a vintage, possibly antique, aesthetic. The person is dressed in a stylish, layered dress with a dark blue top and a lighter blue bottom tier, both featuring floral patterns and embellishments such as lace and beads. The dress has a ruffled hem and is cinched at the waist with a bow. The person's hair is styled in a voluminous, curly fashion with a greenish hue, and is accessorized with a floral headpiece that matches the dress's theme.

Around the neck, there's a multi-strand pearl necklace, and the wrists are adorned with bracelets and rings that complement the overall outfit's elegance. The person's pose is graceful, with one hand delicately touching the collarbone and the other slightly raised, as if in mid-gesture or adjustment of the dress.

The setting includes a wooden counter with various items on it, including a brass bowl, a book with a gold spine, and what appears to be a plant or decorative item in a pot, contributing to the room's old-world charm. The floor is tiled, and the window behind the person allows natural light to filter through, casting a warm glow on the scene. The overall mood of the image is one of nostalgic elegance and fashion-forward vintage style. <|endoftext|>

我可能知道是因为什么引起的了 同样的提问和图片 我是用trans_cli_vision_demo.py就会产生问题描述的异常 当我使用使用以下方法快速调用 GLM-4V-9B 多模态模型给出的方法,输出就是正常的。

zRzRzRzRzRzRzR commented 3 months ago
image

这里的参数不一样,调整成2500 0.8 同时把"top_k": 1加了,不然默认是50,看看会正常吗

FFFFFFpy commented 3 months ago

和这三个参数应该没关系 "temperature": temperature, "stopping_criteria": StoppingCriteriaList([stop]), "repetition_penalty": 1.5, "eos_token_id": [151329, 151336, 151338], 我将他们全部注释,并依次解开 全部注释正常输出 解开temperature,正常输出 额外解开stopping_criteria,正常输出 额外解开repetition_penalty,开始无限输出,并且乱码 全部解开,开始无限输出,少许乱码

zRzRzRzRzRzRzR commented 3 months ago

repetition_penalty肯定是要写的呀,1.2要调整的是topk top p

FFFFFFpy commented 3 months ago

不管我的max_length,top_p,top_k填什么,只要我没把repetition_penalty,eos_token_id注释,它的输出就是无限输出,并且乱码

zRzRzRzRzRzRzR commented 3 months ago

repetition_penalty,eos_token_id肯定是要写的啊....