Deep Learning at Scale At the Intersection of Hardware Software and Data 1st Edition Suneeta Mall download
Deep Learning at Scale At the Intersection of Hardware Software and Data 1st Edition Suneeta Mall download
https://ebookfinal.com/download/deep-learning-at-scale-at-the-
intersection-of-hardware-software-and-data-1st-edition-suneeta-
mall/
https://ebookfinal.com/download/levinas-and-education-at-the-
intersection-of-faith-and-reason-1st-edition-denise-egea-kuehne/
https://ebookfinal.com/download/data-scientists-at-work-1st-edition-
sebastian-gutierrez/
https://ebookfinal.com/download/effective-devops-building-a-culture-
of-collaboration-affinity-and-tooling-at-scale-1st-edition-jennifer-
davis/
https://ebookfinal.com/download/the-vices-of-learning-morality-and-
knowledge-at-early-modern-universities-1st-edition-sari-kivisto/
https://ebookfinal.com/download/learning-at-work-how-to-support-
individual-and-organizational-learning-3rd-edition-bridgett-oconner/
https://ebookfinal.com/download/black-hat-physical-device-security-
exploiting-hardware-and-software-1st-edition-drew-miller/
https://ebookfinal.com/download/learn-hardware-firmware-and-software-
design-2nd-edition-edition-o-g-popa/
https://ebookfinal.com/download/deep-learning-for-finance-creating-
machine-deep-learning-models-for-trading-in-python-1st-edition-kaabar/
Deep Learning at Scale At the Intersection of Hardware
Software and Data 1st Edition Suneeta Mall Digital
Instant Download
Author(s): Suneeta Mall
ISBN(s): 9781098145286, 1098145283
Edition: 1
File Details: PDF, 20.80 MB
Year: 2024
Language: english
Deep Learning at Scale “A new paradigm is
Bringing a deep learning project into production at scale emerging, one where our
is quite challenging. To successfully scale your project, you programs are written on
require a foundational understanding of the deep learning distributed architectures
stack—specifically, how deep learning interfaces with through data. This requires
hardware, software, and data. a change of approach and
Ideal for anyone interested in model development at scale, a new set of challenges:
this book illustrates complex concepts of the deep learning leveraging data to do
stack and reinforces them through practical exercises. our bidding while facing
Author Suneeta Mall explains the intricate concepts, tools, the challenges arising
and techniques to help you scale your deep learning model from distributed
development and training workload effectively and efficiently. computing. This book
Topics include:
offers a comprehensive
overview of what this
• How your model is decomposed into a computation entails, making it an
graph and how your data flows through this graph interesting starting point
during the training process
for less experienced
• How accelerated computing speeds up your training practitioners and a great
and how you can best utilize the hardware resources reference for experts.”
at your disposal —Giovanni Alzetta, PhD
• How to train your model using distributed training Machine Learning Engineer
at Oramasearch
paradigms (e.g., data, model, pipeline, and hybrid
multidimensional parallelism)
• Debugging, monitoring, and investigating bottlenecks Suneeta Mall is head of the AI
that undesirably slow down the scale out of model training Engineering Division at harrison.ai,
a clinician-led artificial intelligence
• How to expedite the training lifecycle and streamline
medical technology company focused
your feedback loop to iterate model development
on addressing significant healthcare
and other related tricks, tools, and techniques to
issues. She has a strong computer
scale your training workload science and engineering background
• How to apply data-centric techniques to efficiently through her roles at IBM, Expedia,
train your model at scale USyd, Nearmap, and harrison.ai.
DATA linkedin.com/company/oreilly-media
youtube.com/oreillymedia
US $79.99 CAN $99.99
ISBN: 978-1-098-14528-6
57999
9 781098 145286
Deep Learning at Scale
At the Intersection of Hardware, Software,
and Data
Suneeta Mall
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Deep Learning at Scale, the cover
image, and related trade dress are trademarks of O’Reilly Media, Inc.
The views expressed in this work are those of the author and do not represent the publisher’s views.
While the publisher and the author have used good faith efforts to ensure that the information and
instructions contained in this work are accurate, the publisher and the author disclaim all responsibility
for errors or omissions, including without limitation responsibility for damages resulting from the use of
or reliance on this work. Use of the information and instructions contained in this work is at your own
risk. If any code samples or other technology this work contains or describes is subject to open source
licenses or the intellectual property rights of others, it is your responsibility to ensure that your use
thereof complies with such licenses and/or rights.
978-1-098-14528-6
[LSI]
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
iii
Scaling Consideration 54
Profiling 55
Hands-On Exercise #2: Getting Complex with PyTorch 57
Model Input Data and Pipeline 58
Model 59
Auxiliary Utilities 60
Putting It All Together 62
Computation Graphs 63
Inference 66
Summary 67
iv | Table of Contents
Running the Example 132
Observations 132
Graph Compilation Using PyTorch 2.0 132
New Components of PyTorch 2.0 133
Graph Execution in PyTorch 2.0 134
Modeling Techniques to Scale Training on a Single Device 136
Graph Compilation 136
Reduced- and Mixed-Precision Training 138
Memory Tricks for Efficiency 142
Optimizer Efficiencies 144
Model Input Pipeline Tricks 148
Writing Custom Kernels in PyTorch 2.0 with Triton 148
Summary 149
Table of Contents | v
Decentralized DDL 199
Dimensions of Scaling Distributed Deep Learning 207
Partitioning Dimensions of Distributed Deep Learning 207
Types of Distributed Deep Learning Techniques 208
Choosing a Scaling Technique 218
Measuring Scale 220
End-to-End Metrics and Benchmarks 221
Measuring Incrementally in a Reproducible Environment 226
Summary 227
8. Scaling Beyond Data Parallelism: Model, Pipeline, Tensor, and Hybrid Parallelism. 259
Questions to Ask Before Scaling Vertically 261
Theoretical Foundations of Vertical Scaling 264
Revisiting the Dimensions of Scaling 265
Operators’ Perspective of Parallelism Dimensions 271
vi | Table of Contents
Data Flow and Communications in Vertical Scaling 271
Basic Building Blocks for Scaling Beyond DP 284
PyTorch Primitives for Vertical Scaling 284
Working with Larger Models 287
Distributed Checkpointing: Saving the Partitioned Model 288
Summary 289
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
Table of Contents | ix
Preface
xi
Why Scaling Matters
Deep learning and scaling are correlated. Deep learning is capable of scaling your
objectives from single task to multitask, from one modality to multimodality, from
one class to thousands of classes. Anything is possible, provided you have scalable
hardware and a large volume of data and write software that can efficiently scale to
utilize all the resources available to you.
Scaling is complex, and thus not free. Developing a deep learning–based system
requires a large number of layers, a large volume of data, and hardware capable of
handling computationally intensive workloads. Scaling requires understanding the
elasticity of your entire system—not just your model but your entire deep learning
stack—and adapting to situations where elasticity nears a breaking point. Therein lies
the secondary motivation of this book: to enable you to gain a deeper understanding
of your system and when it might break, and how you can avoid unnecessary breaks.
• How your model is decomposed into a computation graph and how your data
flows through this graph during the training process.
• The less told but beautiful story of floating-point numbers and how these Higgs
bosons of deep learning can be used to achieve memory efficiency.
xii | Preface
• How accelerated computing speeds up your training and how you can best utilize
the hardware resources at your disposal.
• How to train your model using distributed training paradigms (i.e., data, model,
pipeline, and hybrid multidimensional parallelism). You will also learn about
federated learning and its challenges.
• How to leverage the PyTorch ecosystem in conjunction with NVIDIA libraries
and Triton to scale your model training.
• Debugging, monitoring, and investigating bottlenecks that undesirably slow
down the scale-out of model training.
• How to expedite the training lifecycle and streamline your feedback loop to iter‐
ate model development and related best practices.
• A set of data tricks and techniques and how to apply them to scale your training
over limited resources.
• How to select the right tools and techniques for your deep learning project.
• Options for managing compute infrastructure when running at scale.
Introduction
Chapter 1, “What Nature and History Have Taught Us About Scale”, sets out the the‐
oretical framework for deciding when to scale and explores the high-level challenges
involved in scaling out. In this chapter, you will also read about the history of deep
learning and how scaling has been a key driver of its success.
Preface | xiii
are achieved and scaled. It also provides detailed insights into the variety of acceler‐
ated hardware available today, to arm you with the knowledge required to choose the
most suitable hardware for your project.
Chapter 4, “Putting It All Together: Efficient Deep Learning”, brings the foundational
knowledge of deep learning together to provide more practical guidance on how to
build an efficient and effective intelligent system for your task and how to measure
and monitor it. In this chapter, you will also learn about graph compilation and a ser‐
ies of memory tricks to provide you with the knowledge to build an efficient stack.
xiv | Preface
Chapter 11, “Scaling Experiments: Effective Planning and Management”, focuses on
scaling out of experiments and provides insights on experiment planning and man‐
agement. This chapter provides useful information for when you’re conducting mul‐
tiple experiments and want to maximize your chances of finding the best-performing
model; it covers techniques like fine tuning, mixture of experts (MoE), contrastive
learning, etc.
Chapter 12, “Efficient Fine-Tuning of Large Models”, explores low-rank fine tuning
of large models with a practical example.
Chapter 13, “Foundation Models”, lays out the conceptual framework of foundation
models and provides a summary of this evolving landscape.
Preface | xv
book does not require permission. Selling or distributing examples from O’Reilly
books does require permission. Answering a question by citing this book and quoting
example code does not require permission. Incorporating a significant amount of
example code from this book into your product’s documentation does require per‐
mission.
We appreciate, but generally do not require, attribution. An attribution usually
includes the title, author, publisher, and ISBN. For example: “Deep Learning at Scale
by Suneeta Mall (O’Reilly). Copyright 2024 Suneeta Mall, 978-1-098-14528-6.”
If you feel your use of code examples falls outside fair use or the permission given
above, feel free to contact us at permissions@oreilly.com.
xvi | Preface
This element indicates a warning or caution.
Our unique network of experts and innovators share their knowledge and expertise
through books, articles, and our online learning platform. O’Reilly’s online learning
platform gives you on-demand access to live training courses, in-depth learning
paths, interactive coding environments, and a vast collection of text and video from
O’Reilly and 200+ other publishers. For more information, visit https://oreilly.com.
How to Contact Us
Please address comments and questions concerning this book to the publisher:
We have a web page for this book, where we list errata, examples, and any additional
information. You can access this page at https://oreil.ly/DLAS.
For news and information about our books and courses, visit https://oreilly.com.
Find us on LinkedIn: https://linkedin.com/company/oreilly-media.
Watch us on YouTube: https://youtube.com/oreillymedia.
Preface | xvii
Acknowledgments
To my beloved family: Your unwavering support and understanding during the cre‐
ation of this book has been huge. My heartfelt thanks to my husband, whose patience
and encouragement kept me going. To my incredible children, your curiosity and
enthusiasm for learning inspire me every day. This book is as much yours as it is
mine.
Mum, Dad, and parents in-law, your love, wisdom, unwavering belief in my abilities,
and endless encouragement have been a guiding light throughout this journey. To
my brother, your perseverance knows no bounds and keeps me inspired. This book is
dedicated to all of you.
To the open source deep learning community: I have deepest gratitude for the open
source communities around the world that have been forthcoming with their knowl‐
edge and work to collectively and collaboratively improve the posture of AI systems
in production. Your commitment to innovation and accessibility in the field of deep
learning has been revolutionary.
The knowledge, tools, and resources that these communities have built together have
not only shaped this book, but have also transformed the landscape of machine learn‐
ing. I’m deeply thankful for your contributions. This work would not have been pos‐
sible without you. I take deep pleasure in dedicating this book to you!
To my dedicated tech reviewers and editorial team: I’m indebted to your valuable
input and dedication to excellence. I would like to acknowledge and express my
deepest gratitude to the technical reviewers, Tim Hauke Langer, Giovanni Alzetta,
Satyarth Praveen, and Vishwesh Ravi Shrimali, and my editor, Sara Hunter, whose
guidance and advice have greatly improved this book. I would also like to express my
gratitude to Nicole Butterfield, my acquisitions editor, for her support and guidance
in shaping the direction of the book.
xviii | Preface
Discovering Diverse Content Through
Random Scribd Documents
I did not fail to listen attentively to their discourse, when I heard
what follows: “I do not deserve,” said the queen to her lover, “your
reproaches for my want of diligence; you well know the reason of it;
but if all the marks of love which I have hitherto given you are not
sufficient to persuade you of my sincerity, I am ready to give you still
more convincing proofs of it; you have only to command, you know
my power. I will if you wish it, before the sun rises, change this great
city and this beautiful palace into frightful ruins, which shall be
inhabited only by wolves, and owls, and ravens. Shall I transport all
the stones, with which these walls are so strongly built, beyond
Mount Caucasus, and farther than the boundaries of the habitable
world? You have only to speak, and all this place shall be
transformed.”
As the queen finished this speech, she and her lover, having
reached the end of the walk, turned to enter another, and passed
before me; I had already drawn my scimitar, and as the lover was
next me, I struck him on the neck, and he fell. I believed I had killed
him, and with this persuasion, I retired precipitately, without
discovering myself to the queen, whom I wished to spare, as she
was my cousin.
Although her lover’s wound was mortal, she yet contrived by her
enchantments to preserve in him that kind of existence, which can
be called neither dead or alive. As I traversed the garden to return
to the palace, I heard the queen weeping bitterly, and judging of her
grief by her cries, I was not sorry to have left him alive. When I
reached my chamber I went again to bed, and feeling satisfied with
the punishment I had inflicted on the wretch who had offended me,
I fell asleep. On waking the next morning, I found the queen by my
side; I cannot say whether she was asleep or feigned it, but I got up
without disturbing her, and retired to my closet, where I finished
dressing: I afterwards attended the council; and, on my return, the
queen, dressed in mourning, her hair dishevelled and torn,
presented herself before me. “Sire,” said she, “I come to entreat
your majesty not to be displeased at the state in which you now see
me. I have just received intelligence of three events, which occasion
the grief I so strongly feel, but can ill express.”—“What are these
events, madam?” I inquired.—“The death of the queen, my beloved
mother,” replied she; “that of the king, my father, who was killed in
battle; and also of my brother, who fell down a precipice.”
I was not sorry that she had invented this pretext to conceal the
true cause of her affliction, and I imagined, that she did not suspect
me of having been the murderer of her lover. “Madam,” said I, “I do
not blame your sorrow; on the contrary, I assure you that I am not
insensible to the cause. I should be much surprised if you were not
affected by such a loss; weep, for your tears are an undoubted proof
of your good heart; I hope, nevertheless, that time and reason will
restore to you your wonted cheerfulness.”
When it was finished, she had her lover removed from the place,
whither she had transported him on the night I wounded him, and
brought to this mausoleum. She had till that period preserved his life
by giving him certain potions, which she administered herself, and
continued to give him daily, after his removal to the Palace of Tears.
All her enchantments, however, did not avail, for he was not only
unable to walk or stand, but had also lost the use of his speech, and
gave no signs of life, but by looks. Although the queen had only the
consolation of seeing him and saying to him all the tender things
that her love inspired, yet she constantly paid him two long visits
every day. I was well acquainted with this circumstance, but I
pretended to be ignorant of it.
I went a second time to the Palace of Tears while she was there. I
hid myself as before, and heard her say, “It is now three years that
you have not spoken to me; nor do you return the proofs of
affection and fondness which my complaints and sighs must
convince you I feel: is it from insensibility or disdain? Hast thou, O
tomb, destroyed that excess of tenderness which he bore me? Hast
thou closed for ever those dear eyes which beamed with love and
formed all my pleasure? Ah no, I cannot think it; rather let me say,
thou art become the deposit of the rarest treasure the world ever
saw.”
I had hardly finished these words, when the queen, who was
seated near the black, started up like a fury, “Ah, wretch!” said she
to me, “it is you who have been the cause of my grief; think not that
I am ignorant of it. I have already dissembled too long. It was your
barbarous hand which reduced the object of my affection to the
miserable state he now is in. And have you the cruelty to come and
insult my despair?” “Yes,” cried I, interrupting her, and transported
with anger, “I have chastised the monster as he deserved, and I
ought to treat thee in the same manner. I repent not having already
done it, for thou hast too long abused my goodness.” In saying this,
I drew my scimitar, and raised my arm to punish her. “Moderate thy
rage,” said she to me with a disdainful smile, and regarding my
motions with a tranquil air, and at the same instant she pronounced
some words which I did not understand, and added, “By virtue of
my enchantments, I command thee from this moment to become
half marble and half man.” Immediately, my lord, I was changed to
what you see me; already dead among the living, and living among
the dead.
The sultan rose as soon as it was day; and having concealed his
robe and external dress, which might incumber him, he went to the
Palace of Tears. He found it illuminated by a multitude of torches of
white wax; and a delicious perfume issuing from various beautiful
golden vases, regularly arranged, struck his senses. As soon as he
perceived the bed on which the black was laid, he drew his sabre,
and destroyed, without resistance, the little remains of life in this
wretch. He then dragged the body into the court of the castle, and
threw it into a well. Having done this he returned, and laid down in
the black’s place, hiding his sabre under the covering, and remained
there in order to complete what he projected. The enchantress
arrived soon after: her first business was to go into the apartment
where the king of the Black Isles, her husband, was. She directly
stripped him, and, with unexampled barbarity, began to inflict upon
his shoulders the accustomed number of blows. The poor prince
filled the whole building with his cries, and conjured her in the most
pathetic manner to have pity on him: the wretch, however, ceased
not to beat him till she had completed the hundred. “Thou hadst no
compassion on my lover,” said she, “expect therefore none from me.”
As soon as she had finished, she threw the coarse garment made of
goat-skin over him, and then the robe of brocade. She next went to
the Palace of Tears; and, on entering, began to renew her
lamentations. When she approached the couch where she thought
her lover always remained, she exclaimed, “What cruelty to have
thus destroyed the tranquil joy of so tender and fond a mistress as I
am! Cruel prince, thou reproachest me with being inhuman, when I
make thee feel the effects of my resentment, and has not thy
barbarity far exceeded my revenge? Hast thou not, traitor, in
destroying almost the existence of so adorable an object, equally
destroyed mine? Alas!” added she, addressing herself to the sultan,
whom she took for the black, “will you always, light of my life,
preserve this silence? Are you resolved to let me die without the
consolation of hearing you again declare you love me. Utter, at least,
one word, I conjure you.”
The queen immediately went out from the Palace of Tears; and
taking a vessel of water, she pronounced over it some words, which
caused it instantly to boil, as if it had been placed on a fire. She
proceeded to the apartment, where the young king, her husband,
was; “If the creator of all things,” said she, throwing the water over
him, “hath formed thee as thou now art, or if he is angry with thee,
do not change; but if thou art in that state by virtue of my
inchantment, reassume thy natural form, and become the same as
before.” She had hardly concluded, when the prince, recovering his
first shape, rose up with all possible joy, and returned thanks to God.
“Go,” said the enchantress, addressing him, “hasten from this castle,
and never return, lest it should cost you your life.”—The young king
yielded to necessity, and left the queen without replying a word. He
concealed himself in some secure spot, where he impatiently waited
the completion of the sultan’s design, the commencement of which
had been so successful.
The day after his arrival, the sultan assembled his courtiers, and
gave them an ample detail of the occurrences, which, contrary to his
wishes, had delayed his return: he then declared to them his
intention of adopting the king of the four Black Isles, who had left a
large kingdom to accompany and live with him; and at last, to
reward the fidelity with which they served him, he bestowed
presents on all, according to their rank and station.
With regard to the fisherman, as he had been the first cause of the
deliverance of the young prince, the sultan overwhelmed him with
rewards, and made him and his family happy and comfortable for
the rest of their days.
THE HISTORY
She then went into a druggist’s, where she furnished herself with
all sorts of sweet-scented waters, with cloves, nutmeg, pepper,
ginger, a large piece of ambergris, and several other Indian spices,
which completely filled the porter’s basket, whom she still ordered to
follow her. He did so, till they arrived at a magnificent house, the
front of which was ornamented with handsome columns, and at the
entrance was a door of ivory. Here they stopped, and the lady gave
a gentle knock at the door. While they waited for it to be opened,
the porter’s mind was filled with a thousand different thoughts. He
was surprised that a lady dressed as this was, should perform the
office of housekeeper, for he conceived it impossible for her to be a
slave. Her air was so noble, that he supposed her free, if not a
person of distinction. He was wishing to ask her some questions
concerning her quality and situation, but just as he was preparing to
speak, another female who opened the door, appeared to him so
beautiful, that he was silent through astonishment, or rather he was
so struck with the brilliancy of her charms, that he was very near
letting his basket and all that was in it fall; so much did this object
make him forget himself. He thought he had never seen any beauty
in his whole life that equalled her who was before him. The lady who
had brought the porter, observed the disturbed state of his mind,
and well knew the cause of it. This discovery diverted her; and she
took so much pleasure in examining the countenance of the porter,
that she forgot the door was open. “Come in, sister,” said the
beautiful portress, “what do you wait for? Don’t you see that this
poor man is so heavily laden he can hardly bear it?”
As soon as she and the porter were come in, the lady who opened
the door shut it; and all three, after passing through a handsome
vestibule, crossed a very spacious court, surrounded by an open
gallery, or corridor, which communicated with many magnificent
apartments, all on the same floor. At the bottom of this court there
was a sort of cabinet, richly furnished, with a throne of amber in the
middle, supported by four ebony pillars, enriched with diamonds and
pearls of an extraordinary size, and covered with red satin, relieved
by a bordering of Indian gold, of admirable workmanship. In the
middle of the court there was a large basin lined with white marble,
and full of the finest transparent water, which rushed from the
mouth of a lion of gilt bronze.
Although the porter was so laden it did not prevent him from
admiring the magnificence of this house, and the neatness and
regularity with which every thing was arranged; but what principally
attracted his attention, was a third lady, who appeared still more
beautiful than the second, and who was seated on the throne before
mentioned. As soon as she perceived the other two females, she
came down from the throne, and advanced towards them. The
porter conjectured, from the looks and behaviour of the two first
ladies, that this was the principal personage; and he was not
mistaken. This lady was called Zobeidè; she who opened the door
was called Safiè, and the name of the one who had been for the
provisions, was Aminè.
Zobeidè at first thought the porter was waiting to get breath, but
observing him remain a long time, she asked him what he waited for,
and whether he was sufficiently paid. “Give him something more,”
added she, speaking to Aminè, “and let him be satisfied.”—“Madam,”
answered the porter, “it is not that which detains me; I am already
almost too well paid for my trouble. I know very well that I am guilty
of an incivility in staying where I ought not; but I hope you will have
the goodness to pardon it, from the astonishment I experience in
observing no man among three ladies of such uncommon beauty. A
party of ladies without men is as melancholy and stupid as a party of
men without ladies.” To this he added some pleasantries in proof of
what he advanced. He did not forget to repeat what they say at
Bagdad, that there was no comfort at table unless there were four;
and he concluded by saying that as they were three, they had the
greatest want of a fourth.
Zobeidè saw that the porter was not deficient in cleverness, but
thinking that he was desirous of being at the entertainment they
were going to have, she good-humouredly replied, “You know that
we are preparing to regale ourselves, and you must also know we
cannot do this but at a considerable expense; and it would not be
just that you should partake of the feast without bearing part of the
costs.” The beautiful Safiè was of the same opinion as her sister. “My
friend,” she said to the porter, “have you never heard the common
saying, if you bring something you shall return with something; if
you bring nothing, you shall carry nothing back?”
They had scarcely began to eat, when Aminè, who had placed
herself near the buffet, or sideboard, took a bottle and goblet, and
poured some for herself. Having drank the first glass, according to
the Arabian custom, she then poured out one for each of her sisters,
who drank it one after the other. Then filling the same goblet for the
fourth time, she presented it to the porter, who in taking it, kissed
her hand, and before he drank it he sung a song, the meaning of
which was, that as the wind carried with it the odour of any
perfumed spot over which it passed, so the wine, which he was
about to drink, coming from her hand acquired a more exquisite
flavour than it naturally possessed. This song pleased them very
much, and they each sung in their turn. In short the whole company
were in most excellent spirits during the repast, which lasted a long
time, and was accompanied with every thing that could render it
agreeable.
The day began to close, when Safiè, in the name of her sisters,
said to the porter, “Arise, and go it; is time to retire.” To this the
porter, not having resolution to quit them, answered, “Ah, ladies,
where would you command me to go in the state I am in? I am
almost beside myself from gazing on you, and the good cheer you
have given me; and I shall never find the way to my own house.
Allow me the night to recover myself in; I will pass it wherever you
please, but less time will not restore me to the state I was in, when I
came here; and even then I doubt I shall leave the better part of
myself behind.”
Aminè again took the part of the porter: “He is right, my sister,”
she exclaimed; “I am convinced of the propriety of his demand. He
has sufficiently diverted us; and if you wish to believe me, or rather
if you love me, I am sure you will suffer him to pass the evening
with us.”—“We cannot refuse any request of yours, my sister,”
replied Zobeidè. “Porter,” she added, addressing herself to him; “we
wish to grant you even this favour, but we must premise a fresh
condition: whatever we may do in your presence, with respect to
yourself or any thing else, take great care that you do not ask the
reason; for in questioning us about things that do not at all concern
you, you may hear what will not please you. Take care, therefore,
and be not too curious in attempting to discover the motives of our
actions.”
This being settled, Aminè brought supper; and when she had
lighted up the hall with numerous candles prepared with aloes and
ambergris, which scattered a very agreeable perfume, and cast a
brilliant light, she seated herself at the table with her sisters and the
porter. They began to eat, drink, sing, and recite verses. The
females took pleasure in making the porter intoxicated, under the
pretence of making him drink to their health. Wit and repartee were
not wanting. They were at length all in the best humour, when they
heard a knocking at the gate. They instantly got up, and all run to
open it; but Safiè, to whom this office more particularly belonged,
was the most active. The other two, seeing her before them,
stopped, and waited till she came back to inform them who could
have any business with them at so late an hour. Safiè soon returned.
“A charming opportunity, my sisters, offers itself to spend great part
of the night very pleasantly, and if you are of the same opinion as I
am, we will not let it escape us. There are three calenders at the
door; at least they appear so by their dress; but what will doubtless
surprise you is, that they are all three blind of the right eye, and
have their heads, beards, and eyebrows shaved. They say, they are
only just arrived at Bagdad, where they have never been before, and
as it is dark, and they knew not where to lodge, they knocked at our
door by chance; and entreat us for the love of God, to have the
charity to take them in. They care not where we put them, provided
they are under cover; and will be satisfied even with a stable. They
are young and well-made and appear to possess some spirit, but I
cannot without laughing, think of their amusing and uniform figures.
Safiè could not indeed refrain from laughing most heartily at this
moment, nor could either her sisters or the porter do otherwise than
join in it. “Shall we,” said she, “let them come in? It is impossible but
that with such men as I have described, we shall finish the day still
better than we begun it. They will divert us very much, and they will
be no expense to us, since they only ask a lodging for one night,
and it is their intention to leave us as soon as it is day.”
On entering they made a low bow to the sisters, who had risen to
receive them; and who obligingly told them they were welcome, and
that they were happy in being able to oblige them, and contribute
towards lessening the fatigue of their journey. They then invited
their new guests to sit down with them. The magnificence of the
place and the kindness of the ladies gave the calenders a very high
idea of the beautiful hostess and her sisters; but before they took
their places, having by chance cast their eyes towards the porter,
and observing that he was dressed very like other calenders, from
whom they differed in many points of discipline, and whose beard
and eyebrows were not shaved, one of them said, “This man
appears to be one of our Arabian brethren, who revolted.”
The porter, half asleep and heated with the wine he had drunk,
was much disturbed at these words; and without getting up he said
to the calenders, casting at the same time a fierce look at them,
“Seat yourselves, and meddle not with what does not concern you.
Have you not read the inscription over the door? Do not pretend
then to make the world live after your fashion; but live according to
ours.”—“My good friend,” replied the calender, who had before
spoken, “do not be angry, for we should be very sorry to give you
any cause; on the contrary, we are ready to receive your
commands.” The dispute would not have ended here had not the
ladies interfered, and pacified all parties.
When the calenders were seated, the sisters helped them, and the
delighted Safiè in particular took care to supply them with wine.
When they had both eaten and drunk as much as they wished, they
intimated that they should be happy to give them some music, if
they had any instruments, and would order them to be brought.
They accepted the offer with pleasure; and the beautiful Safiè
immediately got up to enquire after some, and returned the next
moment and offered them a flute of that country, also another used
in Persia, and a tambour de basque. Each calender received from
her hand that instrument he liked best, and they all began to play a
little air. The females were acquainted with the words, which were
very lively, and accompanied the air with their voices: frequently
interrupting each other with fits of laughter from the nature of the
words.
In the midst of this entertainment, and when the party were highly
delighted, they heard a knock at the door. Safiè immediately left off
singing, and went to see who it was.
It was, then, the grand vizier Giafar who had knocked at the door
by order of the caliph, who wished not to be known. Safiè opened it,
and the vizier observed, by the light of a candle she carried, that she
was very beautiful. He played his part very well. He first made a
most profound reverence, and then, with a respectful air, he said,
“Madam, we are three merchants of Moussoul, and arrived here
about ten days ago, with some very rich merchandise, which we
have deposited in a khan; where we have taken up our lodging. We
have been to spend the day with a merchant of this city, who had
invited us to go to see him. He treated us with a fine collation; and
as the wine we drunk put us into a very good humour, he sent for a
company of dancers. The night was already far advanced, and while
we were playing on our instruments, the others dancing, and the
whole company making a great noise, the watch happened to pass
by, and obliged us to open the door. Some of the company were
arrested: we were however so fortunate as to escape, by getting
over a wall. But,” added the vizier, “as we are strangers, and have
taken perhaps rather more wine than we ought, we are afraid of
meeting with a second party of the watch, or perhaps the same
before we arrive at our khan, which is at a considerable distance
from hence. And we should even then get there to no purpose, for
the gate would be shut, and whoever may come there, they will not
open it till morning. This is the reason, madam, that as we heard, in
passing by, the sound of instruments and voices, we thought all
those who belonged to the house were not yet retired, and we took
the liberty to knock, to beg you to afford us a retreat till the
morning. If we appear to you worthy of taking a part in your
amusements, we will endeavour, as far as we are able, to contribute
to it, in order to repair the interruption we have caused; if not, do us
at least the favor to suffer us to pass the night under the cover of
your vestibule.”
While the vizier Giafar entertained them, the caliph ceased not
from admiring the extraordinary beauty, the great elegance, the
lively disposition and spirit of the ladies; while the appearance of the
three calenders, all blind of the right eye, surprised him very much.
He anxiously wished to learn the cause of this singularity, but the
conditions they had imposed upon him and his companions,
prevented any inquiry. Besides all this, when he reflected upon the
richness of the services and furniture; with the regularity and
arrangement every where apparent, he could hardly persuade
himself it was not the effect of enchantment.
The porter carried the one that had been beaten back to the
closet; and in returning took the other from the hands of Aminè, and
presented it to Zobeidè, who was waiting for it. “Hold it as you did
the first,” said she; then taking the whip, she served this in the same
manner. She then wept with it, dried its tears, kissed it, and returned
it to the porter, who was saved the trouble of carrying it back to the
closet by the agreeable Aminè, who took it herself.
The three calenders, as well as the caliph and his party, were
much astonished at this ceremony. They could not comprehend why
Zobeidè, after having whipped, with so much violence, the two dogs,
which, according to the tenets of the Mussulman religion, are impure
animals, should afterwards weep with them, kiss them, and dry their
tears. They conversed together about it, and the caliph in particular
was very desirous of knowing the reason of an action which
appeared to him so singular. He made signs to the vizier to inquire,
but he turned his head another way, till at last, importuned by
repeated signs, he answered in the same manner, that it was not yet
time to satisfy his curiosity.
The company continued for some time silent: at length Safiè, who
had placed herself on the seat in the middle of the room, said to
Aminè, “Sister get up, you understand what I mean.” Aminè rose
and went into a different closet from that whence the dogs were
brought; she returned with a case covered with yellow satin, and
richly ornamented with an embroidery of green and gold. She
opened it, and took out a lute, which she presented to her sister.
Safiè took it, and after having tuned it, began to accompany it with
her voice: she sung an air on the torments of absence, in so
agreeable a style, that the caliph and the rest of the company were
enchanted. When she had finished, as she had sung with a great
deal of action as well as passion, she offered the lute to Aminè,
saying, “Sister, my voice fails me; do you take it, and oblige the
company by playing and singing instead of me.”
Whilst Zobeidè and Safiè ran to assist their sister, one of the
calenders exclaimed, “We had better have slept in the open air than
come here to witness such a spectacle.”
The caliph, who heard him, drew near, and enquired what all this
meant: “We know no more than you,” replied the calender. “What,”
resumed the caliph, “do not you belong to the house? cannot you
inform me about these two black dogs, and this lady, who appears
to have been so ill treated?”—“Sir,” said the calender, “we never
were in this house before now, and entered it only a few minutes
sooner than you did.” This increased the astonishment of the caliph,
“Perhaps,” said he, “the man who is with you can give us some
information.” The calender made signs to the porter to draw near,
and asked him if he knew why the black dogs had been beaten, and
why the bosom of Aminè was so scarred. “Sir,” replied the porter, “I
swear by the great living God, that if you know nothing of the
matter, we are all equally ignorant. It is true that I live in the city,
but before to-day I never entered this house; and if you are
surprised to see me here, I am not less so at being in such company.
What increases my surprise,” added he, “is not to see any man with
these ladies.”
The caliph and his party, as well as the calenders, thought that the
porter belonged to the family, and that he would have been able to
have informed them of what they wished so much to know. The
caliph, whatever might be the consequence, resolved to satisfy his
curiosity. “Attend to me,” he said to the rest, “we are seven men and
there are only three women, let us then compel them to give us the
information we request; and if they refuse to comply with a good
grace, we can force them to it. The grand vizier, Giafar, opposed this
plan; and explained the consequences of it to the caliph, without
discovering to the calenders who he was, as he always addressed
him like a merchant. “Consider, sir, I beg,” said he, “that we have our
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookfinal.com