Modify all-in-one benchmark (#10726)

* Update 8192 prompt in all-in-one

* Add cpu_embedding param for linux api

* Update run.py

* Update README.md
This commit is contained in:
yb-peng 2024-04-11 13:38:50 +08:00 committed by GitHub
parent 301504aa8d
commit 2685c41318
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 166 additions and 61 deletions

View file

@ -56,7 +56,7 @@ test_api:
# - "bigdl_ipex_int8"
# - "speculative_cpu"
# - "deepspeed_transformer_int4_cpu" # on Intel SPR Server
cpu_embedding: False # whether put embedding to CPU (only avaiable now for gpu win related test_api)
cpu_embedding: False # whether put embedding to CPU
streaming: False # whether output in streaming way (only avaiable now for gpu win related test_api)

View file

@ -32,5 +32,5 @@ test_api:
# - "bigdl_ipex_int8"
# - "speculative_cpu"
# - "deepspeed_transformer_int4_cpu" # on Intel SPR Server
cpu_embedding: False # whether put embedding to CPU (only avaiable now for gpu win related test_api)
cpu_embedding: False # whether put embedding to CPU
streaming: False # whether output in streaming way (only avaiable now for gpu win related test_api)

View file

@ -1,50 +1,154 @@
The sun was setting over the horizon, casting long shadows across the dusty ground of the town square. The last rays of light streamed through the gaps between the buildings, illuminating the cobblestones and the people milling about. A group of children played a rough game of tag, their laughter filling the air.
In the center of the square stood a lone figure, a man with a tired face and weary eyes. He was tall and broad shouldered, but his posture was slumped and his head hung low. Despite the warmth of the day, he wore a thick woolen coat that seemed too heavy for the weather.
The man looked out at the crowd, his gaze sweeping over the faces of the townspeople as they went about their business. His eyes settled on a young woman standing on the edge of the square, watching him with curiosity. She was pretty, with chestnut hair pulled back into a ponytail and bright green eyes that sparkled in the fading light.
The man felt a sudden jolt of recognition, as if he had seen her before. But he couldn't remember where or when. He tried to shake off the feeling, but it lingered like a ghostly presence.
Suddenly, the woman's eyes widened in alarm, and she began to run towards him. Her movements were urgent and panicked, as if she was trying to escape something or someone. The man watched her go, his confusion growing with each step.
He turned to look around the square, but there was no sign of anyone else. It was as if the woman had appeared out of nowhere, and now she was gone just as suddenly.
The man rubbed his temples, feeling a mounting sense of unease. He tried to make sense of what he had just seen, but it was like trying to grasp smoke in his hands. He shook his head, frustrated with himself for being so easily spooked.
Just then, a voice called out from behind him. "Hey there! You look lost."
The man turned to see a young man standing behind him, a friendly smile on his face. He was tall and lean, with tousled blond hair that seemed to glow in the fading light. His eyes were bright and curious, as if he was eager to know everything about the world around him.
The man hesitated for a moment, unsure of how to respond. He wasn't used to talking to strangers, especially ones who looked so young and innocent. But there was something about the boy that made him feel comfortable, as if he had known him all his life.
"I'm not lost," he said finally, his voice gruff but friendly. "Just a little confused, I guess."
The boy grinned. "Well, I can help with that! My name is Jake, by the way. What's your name?"
The man hesitated for a moment, then introduced himself as Michael. They chatted for a few minutes, exchanging small talk and pleasantries. But even as they spoke, the man couldn't shake the feeling that something was amiss. It was as if he had forgotten something important, something that he needed to remember before it was too late.
He excused himself from Jake, promising to come back later and chat some more. As he walked away, he felt a growing sense of unease. Something wasn't right, and he needed to figure out what it was before it was too late.
[CHAPTER 4:
THE LIBRARY](9781441125608_epub_itb-ch4.xhtml)
The man returned to the library, his mind still racing with thoughts of the mysterious boy and the strange feeling that had been nagging at him all day. He wandered through the shelves, scanning the titles of books and flipping through their pages, searching for something that might help him remember what he had forgotten.
It wasn't until he stumbled upon a book on ancient myths and legends that he felt a spark of recognition. As he read through the stories of gods and monsters, he began to recall fragments of memories from his own life. Memories of strange symbols carved into walls, of dreams filled with images of a dark forest and a mysterious figure.
He realized with a start that these were not just random memories, but pieces of a larger puzzle that had been scattered throughout his life. He felt a sudden urgency to put them together before they faded away completely.
As he continued to read through the book, he began to notice patterns and connections between the myths and his own memories. The symbols he had seen as a child were not just random carvings, but part of an ancient language that held the key to unlocking the secrets of his past.
With newfound determination, the man decided to use every resource at his disposal to solve the mystery of his life. He began to scour books and artifacts, piecing together fragments of information until they formed a clear picture of what had really happened to him.
The truth was stranger than he could have ever imagined, and it led him on a journey that would take him deep into the heart of the enigmatic city where he had lived his entire life. The deeper he delved, the more he realized that his past was connected to a dark conspiracy that had been hidden from him for his own protection.
As he uncovered the truth, he also discovered that he was not alone in his quest. There were others who shared his memories and knew the secrets of the city's hidden history. They banded together to form a small community, each contributing their unique talents to uncover the truth about their past lives.
Together, they began to piece together a stunning picture of a world that had been lost for centuries, a world where magic and technology had coexisted in perfect harmony. They discovered artifacts and documents that revealed the true extent of the city's power and influence, and how it had affected the course of human history.
But with this newfound knowledge came danger and intrigue, as powerful forces sought to keep the secrets of the past buried forever. The man and his companions found themselves in a desperate race against time, trying to uncover everything they could about their past lives before it was too late.
As the truth came into focus, the man realized that he had been given a second chance at life, a chance to make amends for the mistakes of his past and to ensure that the truth would never be forgotten again. He knew that his journey was far from over, but he was ready to face whatever lay ahead, armed with the knowledge that he had spent a lifetime accumulating.
[CHAPTER 5:
THE MYSTERIOUS FIGURE](9781441125608_epub_itb-ch5.xhtml)
The man's heart raced as he stumbled upon a clue that might lead him to the mysterious figure from his memories. He had been searching for weeks, scouring the city's forgotten corners and reading every book he could find that might hold a clue. And finally, he had found something.
It was a small, hand-drawn map that seemed to show the location of an underground chamber deep beneath the city. The map was old and faded, but the man could make out several landmarks that matched up with his own memories of the dark forest. He felt a thrill of excitement at the thought that he might finally uncover the truth about the figure he had seen so many years ago.
The man quickly gathered a team of fellow seekers and set out to find the chamber. They followed the map through a labyrinth of tunnels and passageways, each step echoing off the walls in the eerie darkness. The air was thick with the smell of damp earth and ancient stone, and the man could feel the weight of history bearing down on him as they went deeper into the underground maze.
Finally, after what felt like an eternity, they reached their destination: a small chamber filled with strange symbols and markings that seemed to be connected to the mysterious figure from his memories. The man's heart raced as he began to decipher the code, piecing together words and phrases that had been lost for centuries.
As he worked, a sudden noise interrupted him. He spun around, his hand already reaching for the hilt of his hidden blade, ready for whatever danger might be lurking in the shadows. But to his surprise, he saw a figure stepping out from behind a stack of crates, their face obscured by a hooded cloak.
The man's heart sank as he realized that this was not the mysterious figure from his memories, but someone else entirely. Still, he kept his wits about him and addressed the stranger cautiously.
"Who are you?" he asked, his voice low and steady. "What do you know about the one I'm looking for?"
The stranger hesitated for a moment before speaking in a hushed tone. "I might be able to help," they said. "But you have to promise me one thing: you must never reveal what you're about to hear to anyone. Not even your closest allies."
The man nodded, his mind racing with the possibilities of what he was about to learn. He knew that this stranger held the key to unlocking the secrets of his past, and he was ready to do whatever it took to get the answers he had been seeking for so long.
[CHAPTER 6:
THE DARK FOREST](9781441125608_epub_itb-ch6.xhtml)
The man awoke with a start, the dream still fresh in his mind. He could see it all so clearly, as if it were etched into his memory like a brand into his skin. The dark forest stretched out before him, the thick canopy of leaves overhead. It was then that he heard the rustling of leaves and the soft earth beneath him.
He stood there, amidst the trees, his senses strained with the sounds of the birds chirping and the wind whispering through the branches above. He looked down at the forest, dappled sunlight filtering through the leaves, casting shadows across the ground as it seemed to beaten gold it cast a warm light
He took a step forward, his foot sinking into the soft earth. He felt a sudden jolt of recognition, as if he had been here before. But he couldn't remember when or why. He tried to shake off the feeling, but it lingered like a ghostly presence.
He walked deeper into the forest, the trees growing taller and closer together. The air grew thick with the scent of damp earth and decaying leaves. He could hear the distant sound of running water, the rush of a river or stream. He followed the sound, his heart pounding in his chest.
As he walked, the trees grew taller and closer together, until he was surrounded by a canopy of leaves that blocked out most of the light. He felt a sudden sense of unease, as if he was being watched. He tried to shake off the feeling, but it lingered like a ghostly presence.
He heard the sound of footsteps behind him, heavy and deliberate. He spun around, his hand already reaching for the hilt of his sword. But there was no one there. He was alone in the forest, surrounded by the silence of the trees.
He took a deep breath, trying to calm himself down. He knew that he was being foolish, that there was no one there. But the feeling persisted, as if he was being watched by an unseen force. He tried to shake off the feeling, but it lingered like a ghostly presence.
He walked on, his senses strained with the sounds of the forest. He could hear the rustling of leaves, the chirping of birds, and the distant sound of running water. But he could not shake off the feeling that he was being watched. He knew that he was alone in the forest, but he could not shake off the feeling that he was being followed.
He walked on, his heart pounding in his chest. He knew that he was being foolish, that there was no one there. But the feeling persisted, as if he was being watched by an unseen force. He tried to shake off the feeling, but it lingered like a ghostly presence.
He walked on, his senses strained with the sounds of the forest. He could hear the rustling of leaves, the chirping of birds, and the distant sound of running water. But he could not shake off the feeling that he was being watched. He knew that he was alone in the forest, but he could not shake off the feeling that he was being followed.
[CHAPTER 7:
Harry Potter and the Sorcerer's Stone
CHAPTER ONE
THE BOY WHO LIVED
Mr. and Mrs. Dursley, of number four, Privet Drive, were proud to say that they were perfectly normal, thank you very much. They were the last people you'd expect to be involved in anything strange or mysterious, because they just didn't hold with such nonsense.
Mr. Dursley was the director of a firm called Grunnings, which made drills. He was a big, beefy man with hardly any neck, although he did have a very large mustache. Mrs. Dursley was thin and blonde and had nearly twice the usual amount of neck, which came in very useful as she spent so much of her time craning over garden fences, spying on the neighbors. The Dursleys had a small son called Dudley and in their opinion there was no finer boy anywhere.
The Dursleys had everything they wanted, but they also had a secret, and their greatest fear was that somebody would discover it. They didn't think they could bear it if anyone found out about the Potters. Mrs. Potter was Mrs. Dursley's sister, but they hadn't met for several years; in fact, Mrs. Dursley pretended she didn't have a sister, because her sister and her good-for-nothing husband were as unDursleyish as it was possible to be. The Dursleys shuddered to think what the neighbors would say if the Potters arrived in the street. The Dursleys knew that the Potters had a small son, too, but they had never even seen him. This boy was another good reason for keeping the Potters away; they didn't want Dudley mixing with a child like that.
When Mr. and Mrs. Dursley woke up on the dull, gray Tuesday our story starts, there was nothing about the cloudy sky outside to suggest that strange and mysterious things would soon be happening all over the country. Mr. Dursley hummed as he picked out his most boring tie for work, and Mrs. Dursley gossiped away happily as she wrestled a screaming Dudley into his high chair.
None of them noticed a large, tawny owl flutter past the window.
At half past eight, Mr. Dursley picked up his briefcase, pecked Mrs. Dursley on the cheek, and tried to kiss Dudley good-bye but missed, because Dudley was now having a tantrum and throwing his cereal at the walls. "Little tyke," chortled Mr. Dursley as he left the house. He got into his car and backed out of number four's drive.
It was on the corner of the street that he noticed the first sign of something peculiar -- a cat reading a map. For a second, Mr. Dursley didn't realize what he had seen -- then he jerked his head around to look again. There was a tabby cat standing on the corner of Privet Drive, but there wasn't a map in sight. What could he have been thinking of? It must have been a trick of the light. Mr. Dursley blinked and stared at the cat. It stared back. As Mr. Dursley drove around the corner and up the road, he watched the cat in his mirror. It was now reading the sign that said Privet Drive -- no, looking at the sign; cats couldn't read maps or signs. Mr. Dursley gave himself a little shake and put the cat out of his mind. As he drove toward town he thought of nothing except a large order of drills he was hoping to get that day.
But on the edge of town, drills were driven out of his mind by something else. As he sat in the usual morning traffic jam, he couldn't help noticing that there seemed to be a lot of strangely dressed people about. People in cloaks. Mr. Dursley couldn't bear people who dressed in funny clothes -- the getups you saw on young people! He supposed this was some stupid new fashion. He drummed his fingers on the steering wheel and his eyes fell on a huddle of these weirdos standing quite close by. They were whispering excitedly together. Mr. Dursley was enraged to see that a couple of them weren't young at all; why, that man had to be older than he was, and wearing an emerald-green cloak! The nerve of him! But then it struck Mr. Dursley that this was probably some silly stunt -- these people were obviously collecting for something... yes, that would be it. The traffic moved on and a few minutes later, Mr. Dursley arrived in the Grunnings parking lot, his mind back on drills.
Mr. Dursley always sat with his back to the window in his office on the ninth floor. If he hadn't, he might have found it harder to concentrate on drills that morning. He didn't see the owls swoop ing past in broad daylight, though people down in the street did; they pointed and gazed open- mouthed as owl after owl sped overhead. Most of them had never seen an owl even at nighttime. Mr. Dursley, however, had a perfectly normal, owl-free morning. He yelled at five different people. He made several important telephone calls and shouted a bit more. He was in a very good mood until lunchtime, when he thought he'd stretch his legs and walk across the road to buy himself a bun from the bakery.
He'd forgotten all about the people in cloaks until he passed a group of them next to the baker's. He eyed them angrily as he passed. He didn't know why, but they made him uneasy. This bunch were whispering excitedly, too, and he couldn't see a single collecting tin. It was on his way back past them, clutching a large doughnut in a bag, that he caught a few words of what they were saying.
"The Potters, that's right, that's what I heard yes, their son, Harry"
Mr. Dursley stopped dead. Fear flooded him. He looked back at the whisperers as if he wanted to say something to them, but thought better of it.
He dashed back across the road, hurried up to his office, snapped at his secretary not to disturb him, seized his telephone, and had almost finished dialing his home number when he changed his mind. He put the receiver back down and stroked his mustache, thinking... no, he was being stupid. Potter wasn't such an unusual name. He was sure there were lots of people called Potter who had a son called Harry. Come to think of it, he wasn't even sure his nephew was called Harry. He'd never even seen the boy. It might have been Harvey. Or Harold. There was no point in worrying Mrs. Dursley; she always got so upset at any mention of her sister. He didn't blame her -- if he'd had a sister like that... but all the same, those people in cloaks...
He found it a lot harder to concentrate on drills that afternoon and when he left the building at five o'clock, he was still so worried that he walked straight into someone just outside the door.
"Sorry," he grunted, as the tiny old man stumbled and almost fell. It was a few seconds before Mr. Dursley realized that the man was wearing a violet cloak. He didn't seem at all upset at being almost knocked to the ground. On the contrary, his face split into a wide smile and he said in a squeaky voice that made passersby stare, "Don't be sorry, my dear sir, for nothing could upset me today! Rejoice, for You-Know-Who has gone at last! Even Muggles like yourself should be celebrating, this happy, happy day!"
And the old man hugged Mr. Dursley around the middle and walked off.
Mr. Dursley stood rooted to the spot. He had been hugged by a complete stranger. He also thought he had been called a Muggle, whatever that was. He was rattled. He hurried to his car and set off for home, hoping he was imagining things, which he had never hoped before, because he didn't approve of imagination.
As he pulled into the driveway of number four, the first thing he saw -- and it didn't improve his mood -- was the tabby cat he'd spotted that morning. It was now sitting on his garden wall. He was sure it was the same one; it had the same markings around its eyes.
"Shoo!" said Mr. Dursley loudly. The cat didn't move. It just gave him a stern look. Was this normal cat behavior? Mr. Dursley wondered. Trying to pull himself together, he let himself into the house. He was still determined not to mention anything to his wife.
Mrs. Dursley had had a nice, normal day. She told him over dinner all about Mrs. Next Door's problems with her daughter and how Dudley had learned a new word ("Won't!"). Mr. Dursley tried to act normally. When Dudley had been put to bed, he went into the living room in time to catch the last report on the evening news:
"And finally, bird-watchers everywhere have reported that the nation's owls have been behaving very unusually today. Although owls normally hunt at night and are hardly ever seen in daylight, there have been hundreds of sightings of these birds flying in every direction since sunrise. Experts are unable to explain why the owls have suddenly changed their sleeping pattern." The newscaster allowed himself a grin. "Most mysterious. And now, over to Jim McGuffin with the weather. Going to be any more showers of owls tonight, Jim?"
"Well, Ted," said the weatherman, "I don't know about that, but it's not only the owls that have been acting oddly today. Viewers as far apart as Kent, Yorkshire, and Dundee have been phoning in to tell me that instead of the rain I promised yesterday, they've had a downpour of shooting stars! Perhaps people have been celebrating Bonfire Night early -- it's not until next week, folks! But I can promise a wet night tonight."
Mr. Dursley sat frozen in his armchair. Shooting stars all over Britain? Owls flying by daylight? Mysterious people in cloaks all over the place? And a whisper, a whisper about the Potters...
Mrs. Dursley came into the living room carrying two cups of tea. It was no good. He'd have to say something to her. He cleared his throat nervously. "Er -- Petunia, dear -- you haven't heard from your sister lately, have you?"
As he had expected, Mrs. Dursley looked shocked and angry. After all, they normally pretended she didn't have a sister.
"No," she said sharply. "Why?"
"Funny stuff on the news," Mr. Dursley mumbled. "Owls... shooting stars... and there were a lot of funny-looking people in town today..."
"So?" snapped Mrs. Dursley.
"Well, I just thought... maybe... it was something to do with... you know... her crowd."
Mrs. Dursley sipped her tea through pursed lips. Mr. Dursley wondered whether he dared tell her he'd heard the name "Potter." He decided he didn't dare. Instead he said, as casually as he could, "Their son -- he'd be about Dudley's age now, wouldn't he?"
"I suppose so," said Mrs. Dursley stiffly.
"What's his name again? Howard, isn't it?"
"Harry. Nasty, common name, if you ask me."
"Oh, yes," said Mr. Dursley, his heart sinking horribly. "Yes, I quite agree."
He didn't say another word on the subject as they went upstairs to bed. While Mrs. Dursley was in the bathroom, Mr. Dursley crept to the bedroom window and peered down into the front garden. The cat was still there. It was staring down Privet Drive as though it were waiting for something.
Was he imagining things? Could all this have anything to do with the Potters? If it did... if it got out that they were related to a pair of -- well, he didn't think he could bear it.
The Dursleys got into bed. Mrs. Dursley fell asleep quickly but Mr. Dursley lay awake, turning it all over in his mind. His last, comforting thought before he fell asleep was that even if the Potters were involved, there was no reason for them to come near him and Mrs. Dursley. The Potters knew very well what he and Petunia thought about them and their kind.... He couldn't see how he and Petunia could get mixed up in anything that might be going on -- he yawned and turned over -- it couldn't affect them....
How very wrong he was.
Mr. Dursley might have been drifting into an uneasy sleep, but the cat on the wall outside was showing no sign of sleepiness. It was sitting as still as a statue, its eyes fixed unblinkingly on the far corner of Privet Drive. It didn't so much as quiver when a car door slammed on the next street, nor when two owls swooped overhead. In fact, it was nearly midnight before the cat moved at all.
A man appeared on the corner the cat had been watching, appeared so suddenly and silently you'd have thought he'd just popped out of the ground. The cat's tail twitched and its eyes narrowed.
Nothing like this man had ever been seen on Privet Drive. He was tall, thin, and very old, judging by the silver of his hair and beard, which were both long enough to tuck into his belt. He was wearing long robes, a purple cloak that swept the ground, and high-heeled, buckled boots. His blue eyes were light, bright, and sparkling behind half-moon spectacles and his nose was very long and crooked, as though it had been broken at least twice. This man's name was Albus Dumbledore.
Albus Dumbledore didn't seem to realize that he had just arrived in a street where everything from his name to his boots was unwelcome. He was busy rummaging in his cloak, looking for something. But he did seem to realize he was being watched, because he looked up suddenly at the cat, which was still staring at him from the other end of the street. For some reason, the sight of the cat seemed to amuse him. He chuckled and muttered, "I should have known."
He found what he was looking for in his inside pocket. It seemed to be a silver cigarette lighter. He flicked it open, held it up in the air, and clicked it. The nearest street lamp went out with a little pop. He clicked it again -- the next lamp flickered into darkness. Twelve times he clicked the Put-Outer, until the only lights left on the whole street were two tiny pinpricks in the distance, which were the eyes of the cat watching him. If anyone looked out of their window now, even beady-eyed Mrs. Dursley, they wouldn't be able to see anything that was happening down on the pavement. Dumbledore slipped the Put-Outer back inside his cloak and set off down the street toward number four, where he sat down on the wall next to the cat. He didn't look at it, but after a moment he spoke to it.
"Fancy seeing you here, Professor McGonagall."
He turned to smile at the tabby, but it had gone. Instead he was smiling at a rather severe-looking woman who was wearing square glasses exactly the shape of the markings the cat had had around its eyes. She, too, was wearing a cloak, an emerald one. Her black hair was drawn into a tight bun. She looked distinctly ruffled.
"How did you know it was me?" she asked.
"My dear Professor, I 've never seen a cat sit so stiffly."
"You'd be stiff if you'd been sitting on a brick wall all day," said Professor McGonagall.
"All day? When you could have been celebrating? I must have passed a dozen feasts and parties on my way here."
Professor McGonagall sniffed angrily.
"Oh yes, everyone's celebrating, all right," she said impatiently. "You'd think they'd be a bit more careful, but no -- even the Muggles have noticed something's going on. It was on their news." She jerked her head back at the Dursleys' dark living-room window. "I heard it. Flocks of owls... shooting stars.... Well, they're not completely stupid. They were bound to notice something. Shooting stars down in Kent -- I'll bet that was Dedalus Diggle. He never had much sense."
"You can't blame them," said Dumbledore gently. "We've had precious little to celebrate for eleven years."
"I know that," said Professor McGonagall irritably. "But that's no reason to lose our heads. People are being downright careless, out on the streets in broad daylight, not even dressed in Muggle clothes, swapping rumors."
She threw a sharp, sideways glance at Dumbledore here, as though hoping he was going to tell her something, but he didn't, so she went on. "A fine thing it would be if, on the very day YouKnow-Who seems to have disappeared at last, the Muggles found out about us all. I suppose he really has gone, Dumbledore?"
"It certainly seems so," said Dumbledore. "We have much to be thankful for. Would you care for a lemon drop?"
"A what?"
"A lemon drop. They're a kind of Muggle sweet I'm rather fond of"
"No, thank you," said Professor McGonagall coldly, as though she didn't think this was the moment for lemon drops. "As I say, even if You-Know-Who has gone -"
"My dear Professor, surely a sensible person like yourself can call him by his name? All this 'You- Know-Who' nonsense -- for eleven years I have been trying to persuade people to call him by his proper name: Voldemort." Professor McGonagall flinched, but Dumbledore, who was unsticking two lemon drops, seemed not to notice. "It all gets so confusing if we keep saying 'You-Know-Who.' I have never seen any reason to be frightened of saying Voldemort's name.
"I know you haven 't, said Professor McGonagall, sounding half exasperated, half admiring. "But you're different. Everyone knows you're the only one You-Know- oh, all right, Voldemort, was frightened of."
"You flatter me," said Dumbledore calmly. "Voldemort had powers I will never have."
"Only because you're too -- well -- noble to use them."
"It's lucky it's dark. I haven't blushed so much since Madam Pomfrey told me she liked my new earmuffs."
Professor McGonagall shot a sharp look at Dumbledore and said, "The owls are nothing next to the rumors that are flying around. You know what everyone's saying? About why he's disappeared? About what finally stopped him?"
It seemed that Professor McGonagall had reached the point she was most anxious to discuss, the real reason she had been waiting on a cold, hard wall all day, for neither as a cat nor as a woman had she fixed Dumbledore with such a piercing stare as she did now. It was plain that whatever "everyone" was saying, she was not going to believe it until Dumbledore told her it was true. Dumbledore, however, was choosing another lemon drop and did not answer.
"What they're saying," she pressed on, "is that last night Voldemort turned up in Godric's Hollow. He went to find the Potters. The rumor is that Lily and James Potter are -- are -- that they're -- dead. "
Dumbledore bowed his head. Professor McGonagall gasped.
"Lily and James... I can't believe it... I didn't want to believe it... Oh, Albus..."
Dumbledore reached out and patted her on the shoulder. "I know... I know..." he said heavily.
Professor McGonagall's voice trembled as she went on. "That's not all. They're saying he tried to kill the Potter's son, Harry. But -- he couldn't. He couldn't kill that little boy. No one knows why, or how, but they're saying that when he couldn't kill Harry Potter, Voldemort's power somehow broke -- and that's why he's gone.
Dumbledore nodded glumly.
"It's -- it's true?" faltered Professor McGonagall. "After all he's done... all the people he's killed... he couldn't kill a little boy? It's just astounding... of all the things to stop him... but how in the name of heaven did Harry survive?"
"We can only guess," said Dumbledore. "We may never know."
Professor McGonagall pulled out a lace handkerchief and dabbed at her eyes beneath her spectacles. Dumbledore gave a great sniff as he took a golden watch from his pocket and examined it. It was a very odd watch. It had twelve hands but no numbers; instead, little planets were moving around the edge. It must have made sense to Dumbledore, though, because he put it back in his pocket and said, "Hagrid's late. I suppose it was he who told you I'd be here, by the way?"
"Yes," said Professor McGonagall. "And I don't suppose you're going to tell me why you're here, of all places?"
"I've come to bring Harry to his aunt and uncle. They're the only family he has left now."
"You don't mean -- you can't mean the people who live here?" cried Professor McGonagall, jumping to her feet and pointing at number four. "Dumbledore -- you can't. I've been watching them all day. You couldn't find two people who are less like us. And they've got this son -- I saw him kicking his mother all the way up the street, screaming for sweets. Harry Potter come and live here!"
"It's the best place for him," said Dumbledore firmly. "His aunt and uncle will be able to explain everything to him when he's older. I've written them a letter."
"A letter?" repeated Professor McGonagall faintly, sitting back down on the wall. "Really, Dumbledore, you think you can explain all this in a letter? These people will never understand him! He'll be famous -- a legend -- I wouldn't be surprised if today was known as Harry Potter day in the future -- there will be books written about Harry -- every child in our world will know his name!"
"Exactly," said Dumbledore, looking very seriously over the top of his half-moon glasses. "It would be enough to turn any boy's head. Famous before he can walk and talk! Famous for something he won't even remember! CarA you see how much better off he'll be, growing up away from all that until he's ready to take it?"
Professor McGonagall opened her mouth, changed her mind, swallowed, and then said, "Yes -- yes, you're right, of course. But how is the boy getting here, Dumbledore?" She eyed his cloak suddenly as though she thought he might be hiding Harry underneath it.
"Hagrid's bringing him."
"You think it -- wise -- to trust Hagrid with something as important as this?"
I would trust Hagrid with my life," said Dumbledore.
"I'm not saying his heart isn't in the right place," said Professor McGonagall grudgingly, "but you can't pretend he's not careless. He does tend to -- what was that?"
A low rumbling sound had broken the silence around them. It grew steadily louder as they looked up and down the street for some sign of a headlight; it swelled to a roar as they both looked up at the sky -- and a huge motorcycle fell out of the air and landed on the road in front of them.
If the motorcycle was huge, it was nothing to the man sitting astride it. He was almost twice as tall as a normal man and at least five times as wide. He looked simply too big to be allowed, and so wild - long tangles of bushy black hair and beard hid most of his face, he had hands the size of trash can lids, and his feet in their leather boots were like baby dolphins. In his vast, muscular arms he was holding a bundle of blankets.
"Hagrid," said Dumbledore, sounding relieved. "At last. And where did you get that motorcycle?"
"Borrowed it, Professor Dumbledore, sit," said the giant, climbing carefully off the motorcycle as he spoke. "Young Sirius Black lent it to me. I've got him, sir."
"No problems, were there?"
"No, sir -- house was almost destroyed, but I got him out all right before the Muggles started swarmin' around. He fell asleep as we was flyin' over Bristol."
Dumbledore and Professor McGonagall bent forward over the bundle of blankets. Inside, just visible, was a baby boy, fast asleep. Under a tuft of jet-black hair over his forehead they could see a curiously shaped cut, like a bolt of lightning.
"Is that where -?" whispered Professor McGonagall.
"Yes," said Dumbledore. "He'll have that scar forever."
"Couldn't you do something about it, Dumbledore?"
"Even if I could, I wouldn't. Scars can come in handy. I have one myself above my left knee that is a perfect map of the London Underground. Well -- give him here, Hagrid -- we'd better get this over with."
Dumbledore took Harry in his arms and turned toward the Dursleys' house.
"Could I -- could I say good-bye to him, sir?" asked Hagrid. He bent his great, shaggy head over Harry and gave him what must have been a very scratchy, whiskery kiss. Then, suddenly, Hagrid let out a howl like a wounded dog.
"Shhh!" hissed Professor McGonagall, "you'll wake the Muggles!"
"S-s-sorry," sobbed Hagrid, taking out a large, spotted handkerchief and burying his face in it. "But I c-c-can't stand it -- Lily an' James dead -- an' poor little Harry off ter live with Muggles -"
"Yes, yes, it's all very sad, but get a grip on yourself, Hagrid, or we'll be found," Professor McGonagall whispered, patting Hagrid gingerly on the arm as Dumbledore stepped over the low garden wall and walked to the front door. He laid Harry gently on the doorstep, took a letter out of his cloak, tucked it inside Harry's blankets, and then came back to the other two. For a full minute the three of them stood and looked at the little bundle; Hagrid's shoulders shook, Professor McGonagall blinked furiously, and the twinkling light that usually shone from Dumbledore's eyes seemed to have gone out.
"Well," said Dumbledore finally, "that's that. We've no business staying here. We may as well go and join the celebrations."
"Yeah," said Hagrid in a very muffled voice, "I'll be takin' Sirius his bike back. G'night, Professor McGonagall -- Professor Dumbledore, sir."
Wiping his streaming eyes on his jacket sleeve, Hagrid swung himself onto the motorcycle and kicked the engine into life; with a roar it rose into the air and off into the night.
"I shall see you soon, I expect, Professor McGonagall," said Dumbledore, nodding to her. Professor McGonagall blew her nose in reply.
Dumbledore turned and walked back down the street. On the corner he stopped and took out the silver Put-Outer. He clicked it once, and twelve balls of light sped back to their street lamps so that Privet Drive glowed suddenly orange and he could make out a tabby cat slinking around the corner at the other end of the street. He could just see the bundle of blankets on the step of number four.
"Good luck, Harry," he murmured. He turned on his heel and with a swish of his cloak, he was gone.
A breeze ruffled the neat hedges of Privet Drive, which lay silent and tidy under the inky sky, the very last place you would expect astonishing things to happen. Harry Potter rolled over inside his blankets without waking up. One small hand closed on the letter beside him and he slept on, not knowing he was special, not knowing he was famous, not knowing he would be woken in a few hours' time by Mrs. Dursley's scream as she opened the front door to put out the milk bottles, nor that he would spend the next few weeks being prodded and pinched by his cousin Dudley... He couldn't know that at this very moment, people meeting in secret all over the country were holding up their glasses and saying in hushed voices: "To Harry Potter -- the boy who lived!"
CHAPTER TWO
THE VANISHING GLASS
Nearly ten years had passed since the Dursleys had woken up to find their nephew on the front step, but Privet Drive had hardly changed at all. The sun rose on the same tidy front gardens and lit up the brass number four on the Dursleys' front door; it crept into their living room, which was almost exactly the same as it had been on the night when Mr. Dursley had seen that fateful news report about the owls. Only the photographs on the mantelpiece really showed how much time had passed. Ten years ago, there had been lots of pictures of what looked like a large pink beach ball wearing different-colored bonnets -- but Dudley Dursley was no longer a baby, and now the photographs showed a large blond boy riding his first bicycle, on a carousel at the fair, playing a computer game with his father, being hugged and kissed by his mother. The room held no sign at all that another boy lived in the house, too.
Yet Harry Potter was still there, asleep at the moment, but not for long. His Aunt Petunia was awake and it was her shrill voice that made the first noise of the day.
"Up! Get up! Now!"
Harry woke with a start. His aunt rapped on the door again.
"Up!" she screeched. Harry heard her walking toward the kitchen and then the sound of the frying pan being put on the stove. He rolled onto his back and tried to remember the dream he had been having. It had been a good one. There had been a flying motorcycle in it. He had a funny feeling he'd had the same dream before.
His aunt was back outside the door.
"Are you up yet?" she demanded.
"Nearly," said Harry.
"Well, get a move on, I want you to look after the bacon. And don't you dare let it burn, I want everything perfect on Duddy's birthday."
Harry groaned.
"What did you say?" his aunt snapped through the door.
"Nothing, nothing..."
Dudley's birthday -- how could he have forgotten? Harry got slowly out of bed and started looking for socks. He found a pair under his bed and, after pulling a spider off one of them, put them on. Harry was used to spiders, because the cupboard under the stairs was full of them, and that was where he slept.
When he was dressed he went down the hall into the kitchen. The table was almost hidden beneath all Dudley's birthday presents. It looked as though Dudley had gotten the new computer he wanted, not to mention the second television and the racing bike. Exactly why Dudley wanted a racing bike was a mystery to Harry, as Dudley was very fat and hated exercise -- unless of course it involved punching somebody. Dudley's favorite punching bag was Harry, but he couldn't often catch him. Harry didn't look it, but he was very fast.
Perhaps it had something to do with living in a dark cupboard, but Harry had always been small and skinny for his age. He looked even smaller and skinnier than he really was because all he had to wear were old clothes of Dudley's, and Dudley was about four times bigger than he was. Harry had a thin face, knobbly knees, black hair, and bright green eyes. He wore round glasses held together with a lot of Scotch tape because of all the times Dudley had punched him on the nose. The only thing Harry liked about his own appearance was a very thin scar on his forehead that was shaped like a bolt of lightning. He had had it as long as he could remember, and the first question he could ever remember asking his Aunt Petunia was how he had gotten it.
"In the car crash when your parents died," she had said. "And don't ask questions."
Don't ask questions -- that was the first rule for a quiet life with the Dursleys.
Uncle Vernon entered the kitchen as Harry was turning over the bacon.
"Comb your hair!" he barked, by way of a morning greeting.
About once a week, Uncle Vernon looked over the top of his newspaper and shouted that Harry needed a haircut. Harry must have had more haircuts than the rest of the boys in his class put
together, but it made no difference, his hair simply grew that way -- all over the place.
Harry was frying eggs by the time Dudley arrived in the kitchen with his mother. Dudley looked a lot like Uncle Vernon. He had a large pink face, not much neck, small, watery blue eyes, and thick blond hair that lay smoothly on his thick, fat head. Aunt Petunia often said that Dudley looked like a baby angel -- Harry often said that Dudley looked like a pig in a wig.
Harry put the plates of egg and bacon on the table, which was difficult as there wasn't much room. Dudley, meanwhile, was counting his presents. His face fell.
"Thirty-six," he said, looking up at his mother and father. "That's two less than last year."
"Darling, you haven't counted Auntie Marge's present, see, it's here under this big one from Mommy and Daddy."
"All right, thirty-seven then," said Dudley, going red in the face. Harry, who could see a huge Dudley tantrum coming on, began wolfing down his bacon as fast as possible in case Dudley turned the table over.
Aunt Petunia obviously scented danger, too, because she said quickly, "And we'll buy you another two presents while we're out today. How's that, popkin? Two more presents. Is that all right''
Dudley thought for a moment. It looked like hard work. Finally he said slowly, "So I'll have thirty ... thirty..."
"Thirty-nine, sweetums," said Aunt Petunia.
"Oh." Dudley sat down heavily and grabbed the nearest parcel. "All right then."
Uncle Vernon chuckled. "Little tyke wants his money's worth, just like his father. 'Atta boy, Dudley!" He ruffled Dudley's hair.
At that moment the telephone rang and Aunt Petunia went to answer it while Harry and Uncle Vernon watched Dudley unwrap the racing bike, a video camera, a remote control airplane, sixteen new computer games, and a VCR. He was ripping the paper off a gold wristwatch when Aunt Petunia came back from the telephone looking both angry and worried.
"Bad news, Vernon," she said. "Mrs. Figg's broken her leg. She can't take him." She jerked her head in Harry's direction.
Dudley's mouth fell open in horror, but Harry's heart gave a leap. Every year on Dudley's birthday, his parents took him and a friend out for the day, to adventure parks, hamburger restaurants, or the movies. Every year, Harry was left behind with Mrs. Figg, a mad old lady who lived two streets away. Harry hated it there. The whole house smelled of cabbage and Mrs. Figg made him look at photographs of all the cats she'd ever owned.
"Now what?" said Aunt Petunia, looking furiously at Harry as though he'd planned this. Harry knew he ought to feel sorry that Mrs. Figg had broken her leg, but it wasn't easy when he reminded himself it would be a whole year before he had to look at Tibbles, Snowy, Mr. Paws, and Tufty again.
"We could phone Marge," Uncle Vernon suggested.
"Don't be silly, Vernon, she hates the boy."
The Dursleys often spoke about Harry like this, as though he wasn't there -- or rather, as though he was something very nasty that couldn't understand them, like a slug.
"What about what's-her-name, your friend -- Yvonne?"
"On vacation in Majorca," snapped Aunt Petunia.
"You could just leave me here," Harry put in hopefull

View file

@ -73,9 +73,9 @@ def run_model(repo_id, test_api, in_out_pairs, local_model_hub=None, warm_up=1,
elif test_api == 'optimize_model':
result = run_optimize_model(repo_id, local_model_hub, in_out_pairs, warm_up, num_trials, num_beams, low_bit, batch_size)
elif test_api == 'transformer_int4_gpu':
result = run_transformer_int4_gpu(repo_id, local_model_hub, in_out_pairs, warm_up, num_trials, num_beams, low_bit, batch_size)
result = run_transformer_int4_gpu(repo_id, local_model_hub, in_out_pairs, warm_up, num_trials, num_beams, low_bit, batch_size, cpu_embedding)
elif test_api == 'transformer_int4_fp16_gpu':
result = run_transformer_int4_gpu(repo_id, local_model_hub, in_out_pairs, warm_up, num_trials, num_beams, low_bit, batch_size, fp16=True)
result = run_transformer_int4_gpu(repo_id, local_model_hub, in_out_pairs, warm_up, num_trials, num_beams, low_bit, batch_size, cpu_embedding, fp16=True)
elif test_api == 'optimize_model_gpu':
result = run_optimize_model_gpu(repo_id, local_model_hub, in_out_pairs, warm_up, num_trials, num_beams, low_bit, batch_size)
elif test_api == 'pytorch_autocast_bf16':
@ -121,7 +121,7 @@ def run_model(repo_id, test_api, in_out_pairs, local_model_hub=None, warm_up=1,
f'-{int(np.mean(result[in_out_pair], axis=0)[4])}',
num_beams,
low_bit,
cpu_embedding if 'win' in test_api else 'N/A',
cpu_embedding,
round(result[in_out_pair][-1][5], 2),
result[in_out_pair][-1][6] if any(keyword in test_api for keyword in ['int4_gpu', 'int4_fp16_gpu_win', 'int4_loadlowbit_gpu', 'fp16_gpu', 'deepspeed_optimize_model_gpu']) else 'N/A',
streaming if 'win' in test_api else 'N/A'],
@ -391,6 +391,7 @@ def run_transformer_int4_gpu(repo_id,
num_beams,
low_bit,
batch_size,
cpu_embedding,
fp16=False):
from ipex_llm.transformers import AutoModel, AutoModelForCausalLM
from transformers import AutoTokenizer, GPTJForCausalLM, LlamaTokenizer
@ -403,29 +404,29 @@ def run_transformer_int4_gpu(repo_id,
if origin_repo_id in CHATGLM_IDS:
if "4bit" in repo_id:
model = AutoModel.load_low_bit(model_path, optimize_model=True,
trust_remote_code=True, use_cache=True).eval()
trust_remote_code=True, use_cache=True, cpu_embedding=cpu_embedding).eval()
else:
model = AutoModel.from_pretrained(model_path, load_in_low_bit=low_bit, optimize_model=True,
trust_remote_code=True, use_cache=True).eval()
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True, cpu_embedding=cpu_embedding)
elif origin_repo_id in LLAMA_IDS:
model = AutoModelForCausalLM.from_pretrained(model_path, load_in_low_bit=low_bit, trust_remote_code=True,
use_cache=True).eval()
use_cache=True, cpu_embedding=cpu_embedding).eval()
tokenizer = LlamaTokenizer.from_pretrained(model_path, trust_remote_code=True)
else:
if "4bit" in repo_id:
model = AutoModelForCausalLM.load_low_bit(model_path, optimize_model=True,
trust_remote_code=True, use_cache=True).eval()
trust_remote_code=True, use_cache=True, cpu_embedding=cpu_embedding).eval()
else:
if 'starcoder' in repo_id:
# Load starcoder-15.5b model in bf16 format to avoid CPU OOM.
model = AutoModelForCausalLM.from_pretrained(model_path, optimize_model=True, load_in_low_bit=low_bit,
trust_remote_code=True, use_cache=True, torch_dtype=torch.bfloat16).eval()
trust_remote_code=True, use_cache=True, cpu_embedding=cpu_embedding, torch_dtype=torch.bfloat16).eval()
# Convert the low-bit model back to fp32 for performance considerations.
model = model.float()
else:
model = AutoModelForCausalLM.from_pretrained(model_path, optimize_model=True, load_in_low_bit=low_bit,
trust_remote_code=True, use_cache=True).eval()
trust_remote_code=True, use_cache=True, cpu_embedding=cpu_embedding).eval()
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
if fp16: