Upload 11 files
Browse files
0.txt
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Gentlemen, owing to lack of time and adverse circumstances, most people leave this world without thinking too much about it. Those who try get a headache and move on to something else. I belong to the second group. As my career progressed, the amount of space dedicated to me in Who’s Who grew and grew, but neither the last issue nor any future ones will explain why I abandoned journalism. This will be the subject of my story, which I wouldn’t tell you under other circumstances anyway.
|
| 2 |
+
I knew a talented boy who decided to build a sensitive galvanometer, and he succeeded all too well; his device would move without any electricity, reacting to tremors of the Earth’s surface. This could be a motto of my story. I was a night shift editor at the foreign branch of UPI. I endured a lot there, including the automation of laying out newspaper pages. I said good-bye to human typesetters and moved on to IBM 0161, a computer built specifically for page composition work. I regret not having been born a hundred fifty years ago. My story would start with “I seduced Countess De…” and if I moved to describing how I snatched the reins from the driver and started to whip the horses so that I could escape the thugs sent by a jealous husband, I wouldn’t have to explain what a countess is, or how seducing works. But it’s not so easy today. The 0161 computer is not a mechanical typesetter. It’s a speed demon, restrained through engineering tricks only so that humans can keep up with it. It replaces ten to twelve people. It’s directly connected to a few dozen teletypes in order for everything typed by our correspondents — in Ankara, Baghdad, or Tokyo — to immediately get into its circuits. The computer cleans it up and throws various layouts of the morning issue pages up on its screen. Between midnight and 3 a.m. — that’s when we close the issue — it can create as many as fifty different variants. It is up to the editor on call to decide which one gets printed. A human typesetter asked to do not fifty but even just five different versions of one issue would go crazy. But the computer works a million times faster than any of us — or it would if it was allowed to. I do realize how much of the appeal of my story I’m destroying with remarks like this. What would be left of the countess’s charms if, instead of extolling the alabaster complexion of her breasts, I started talking about their chemical makeup? Those are difficult times for raconteurs; everything approachable is anachronistic, and everything sensational requires pages from encyclopedias and a university textbook. However, no one figured out a solution for this. And the collaboration with the IBM was fascinating. Whenever a new story comes in — it all happens in a big round room, filled with constant teletype clatter — the computer immediately flows it into the page layout, of course only on the screen. It’s all shadow play, a game of electrons. Some grieve for people who lost those jobs. I didn’t. A computer has no ambitions, it doesn’t get upset if five minutes to three the last piece of domestic news is missing, it isn’t perturbed by household worries, doesn’t need to borrow money before the month’s end, doesn’t get tired, won’t make you feel it knows everything better, and it definitely won’t take offense if you ask it to kick out straight to the last page, in nonpareille, whatever it just put as a headline. But it’s also incredibly demanding, and it’s not something that’s immediately recognizable. If you say “no,” it’s a definitive, decisive “no,” a tyrant’s sentence, since the computer cannot disobey! But since it never gets anything wrong, any mistakes in the morning edition will be mistakes of people. The creators of the IBM thought of absolutely everything, except for one little detail: regardless of how well-balanced and bolted down they are, the teletypes will vibrate, just like fast typewriters would. Because of those vibrations, the cables connecting our teletypes with the computer have a tendency to loosen, eventually causing the plugs to disconnect. It happens rarely, perhaps once or twice a month. It’s not a huge nuisance — you only have to get up and put the plug back in — so no one ever requested better plugs. Every one of us on-call editors thought about it, but without much conviction. And it’s possible that the plugs are different now. If so, then the revelation I want to tell you about will never be repeated.
|
| 3 |
+
It happened on a Christmas Eve. My issue was ready just before 3 a.m. — I liked having a reserve of even a few minutes, enough to rest and light my pipe. I felt content that the rotary was waiting not for me, but for the latest piece of news — that Eve it was about Iran, which had experienced an earthquake just that morning. The agencies reported only a fragment of the correspondent’s dispatch, since the first tremor was followed by another, strong enough to destroy the cable connection. Since the radio was silent too, we thought that the broadcasting station must have been in ruins. We were counting on our man, Stan Rogers. He was as small as a jockey and knew how to use that; sometimes he would manage to get onboard a military helicopter already packed to the brim, since he weighed no more than a suitcase. The screen was filled with the layout of the front page — save for one blank, white rectangle. The connection to Iran was still lost. And even though some of the teletypes were still clattering in the background, I recognized the sound of the Iranian one immediately when it became active. It was a matter of experience. It took me by surprise that the white rectangle remained empty, even though the words should be filling in at the same speed as the teletype’s printing. But the pause lasted just a second or two. Then the entire piece, rather concise, materialized on the screen at the same time, which surprised me too. I remember it by heart. The headline was already there. Underneath, it was reported: “In Sherabad, underground tremors of a seven- and eight-degree magnitude repeated themselves twice between ten and eleven a.m. local time. The city is in ruins. The estimated toll is 1,000 people, with 6,000 homeless.”
|
| 4 |
+
I heard the buzzer; the printer was warning me it was 3 a.m. Since such a terse story left a bit of free space, I diluted it with two extra sentences and through the strike of a key sent down the entire issue to the printing office, where it would go straight to the linotypes and then to the rotary presses.
|
| 5 |
+
I had nothing else to do, so I got up to stretch my bones. As I was reigniting my pipe, I noticed a cable on the floor. It was disconnected from a teletype, the Ankara teletype, which was exactly the one Rogers was using. As I was picking up the cable, a nonsensical thought flashed through my head: what if the cable was already disconnected when the teletype sounded off? It was obviously an absurd thought, since how could the computer write a story without that connection? I slowly walked to the teletype, tore off a piece of paper with the imprinted message, and raised it towards my eyes. Immediately, I sensed it was phrased differently, but as usual for this hour I felt tired and scattered and didn’t trust my memory. I turned on the computer again, asked it to show me the front page, and compared both pieces. They were indeed different, although not by much. The teletype version read:
|
| 6 |
+
“Between ten and eleven local time, two aftershocks occurred in Sherabad, at a magnitude of seven and eight degrees. The city is completely destroyed. The number of casualties tops five hundred, and those without roofs over their heads count six thousand.”
|
| 7 |
+
I stood there, staring at the screen, then at the paper, and then at the screen again. I had no idea what to think or do. Factually, both versions were almost identical, the only difference being the casualty estimation: Ankara reported half a thousand, the computer doubled it. My regular journalist reflexes kicked in, and I immediately called the printer.
|
| 8 |
+
“Hey,” I said to Langhorne, the lead linotypist. “I found an error in the Iranian message, first page, third column, last line, instead of one thousand, should be…”
|
| 9 |
+
I stopped since the Turkish teletype woke up and started clattering: “Attention. Latest news. Attention. The number of earthquake casualties now estimated to be one thousand. Rogers.”
|
| 10 |
+
“Hey, so…? What do you want it to be?” shouted Langhorne from downstairs. I sighed.
|
| 11 |
+
“Sorry, man,” I said. “No mistake. My fault. It’s alright, okay to go as is.”
|
| 12 |
+
I put the handset away, walked to the teletype, and read the addition a good half a dozen times. I liked it less and less with every read. I felt that, I don’t know, the floor was getting soft below my feet. I walked around the computer, looking at it with distrust and — I was certain — a bit of fear. How did it do it? I didn’t understand anything and felt that the longer I tried to think about it, the less I would comprehend.
|
1.txt
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Albert Einstein
|
| 2 |
+
|
| 3 |
+
## Biography
|
| 4 |
+
|
| 5 |
+
**Albert Einstein** (14 March 1879 – 18 April 1955) was a German-born theoretical physicist who is best known for developing the theory of relativity. Einstein also made important contributions to quantum mechanics. His mass–energy equivalence formula $E = mc^2$, which arises from special relativity, has been called "the world's most famous equation". He received the 1921 Nobel Prize in Physics for "his services to theoretical physics, and especially for his discovery of the law of the photoelectric effect".
|
| 6 |
+
|
| 7 |
+
Born in the German Empire, Einstein moved to Switzerland in 1895, forsaking his German citizenship the following year. In 1897, at the age of seventeen he enrolled in the mathematics and physics teaching diploma program at the Swiss Federal Polytechnic School in Zurich, graduating in 1900. He acquired Swiss citizenship a year later and afterwards secured a permanent position at the Swiss Patent Office in Bern. In 1905, he submitted a successful PhD dissertation to the University of Zurich. In 1914, he moved to Berlin to join the Prussian Academy of Sciences and the Humboldt University of Berlin, becoming director of the Kaiser Wilhelm Institute for Physics. In 1933, while Einstein was visiting the United States, Adolf Hitler came to power in Germany. Horrified by the Nazi persecution of his fellow Jews, he decided to remain in the US, and was granted American citizenship in 1940. On the eve of World War II, he endorsed a letter to President Franklin D. Roosevelt alerting him to the potential German nuclear weapons program and recommending that the US begin similar research.
|
| 8 |
+
|
| 9 |
+
In 1905, he published four groundbreaking papers, sometimes described as his *annus mirabilis* (miracle year). These papers outlined a theory of the photoelectric effect, explained Brownian motion, introduced his special theory of relativity, and demonstrated that if the special theory is correct, mass and energy are equivalent to each other. In 1915, he proposed a general theory of relativity that extended his system of mechanics to incorporate gravitation. A cosmological paper that he published the following year laid out the implications of general relativity for the modeling of the structure and evolution of the universe as a whole. In 1917, Einstein wrote a paper which laid the foundations for the concepts of both laser and maser, and contained a trove of information that would be beneficial to developments in physics later on, such as quantum electrodynamics and quantum optics. A joint paper in 1935, with physicist Nathan Rosen, introduced the notion of a wormhole.
|
| 10 |
+
|
| 11 |
+
In the middle part of his career, Einstein made important contributions to statistical mechanics and quantum theory. Especially notable was his work on the quantum physics of radiation, in which light consists of particles, subsequently called photons. With physicist Satyendra Nath Bose, he laid the groundwork for Bose-Einstein statistics. For much of the last phase of his academic life, Einstein worked on two endeavors that ultimately proved unsuccessful. First, he advocated against quantum theory's introduction of fundamental randomness into science's picture of the world, objecting that "God does not play dice". Second, he attempted to devise a unified field theory by generalizing his geometric theory of gravitation to include electromagnetism. As a result, he became increasingly isolated from mainstream modern physics. In 1999, he was named *Time*'s Person of the Century.
|
| 12 |
+
|
| 13 |
+
On 17 April 1955, Einstein experienced internal bleeding caused by the rupture of an abdominal aortic aneurysm which had previously been reinforced surgically by Rudolph Nissen in 1948. He took the draft of a speech he was preparing for a television appearance commemorating the state of Israel's seventh anniversary with him to the hospital, but he did not live to complete it.
|
| 14 |
+
|
| 15 |
+
Einstein refused surgery, saying, "I want to go when I want. It is tasteless to prolong life artificially. I have done my share; it is time to go. I will do it elegantly." He died in the Princeton Hospital early the next morning at the age of 76, having continued to work until near the end.
|
| 16 |
+
|
| 17 |
+
## Scientific career
|
| 18 |
+
|
| 19 |
+
Throughout his life, Einstein published hundreds of books and articles. He published more than 300 scientific papers and 150 non-scientific ones. On 5 December 2014, universities and archives announced the release of Einstein's papers, comprising more than 30,000 unique documents. In addition to the work he did by himself he also collaborated with other scientists on additional projects including the Bose–Einstein statistics, the Einstein refrigerator and others.
|
| 20 |
+
|
| 21 |
+
### Special relativity
|
| 22 |
+
|
| 23 |
+
Einstein's "*Zur Elektrodynamik bewegter Körper*" ("On the Electrodynamics of Moving Bodies") was received on 30 June 1905 and published 26 September of that same year. It reconciled conflicts between Maxwell's equations (the laws of electricity and magnetism) and the laws of Newtonian mechanics by introducing changes to the laws of mechanics. Observationally, the effects of these changes are most apparent at high speeds (where objects are moving at speeds close to the speed of light). The theory developed in this paper later became known as Einstein's special theory of relativity.
|
| 24 |
+
|
| 25 |
+
This paper predicted that, when measured in the frame of a relatively moving observer, a clock carried by a moving body would appear to slow down, and the body itself would contract in its direction of motion. This paper also argued that the idea of a luminiferous aether—one of the leading theoretical entities in physics at the time—was superfluous.
|
| 26 |
+
|
| 27 |
+
In his paper on mass–energy equivalence, Einstein produced $E = mc^2$ as a consequence of his special relativity equations. Einstein's 1905 work on relativity remained controversial for many years, but was accepted by leading physicists, starting with Max Planck.
|
| 28 |
+
|
| 29 |
+
Einstein originally framed special relativity in terms of kinematics (the study of moving bodies). In 1908, Hermann Minkowski reinterpreted special relativity in geometric terms as a theory of spacetime. Einstein adopted Minkowski's formalism in his 1915 general theory of relativity.
|
| 30 |
+
|
| 31 |
+
### General relativity
|
| 32 |
+
|
| 33 |
+
#### General relativity and the equivalence principle
|
| 34 |
+
|
| 35 |
+
General relativity (GR) is a theory of gravitation that was developed by Einstein between 1907 and 1915. According to it, the observed gravitational attraction between masses results from the warping of spacetime by those masses. General relativity has developed into an essential tool in modern astrophysics; it provides the foundation for the current understanding of black holes, regions of space where gravitational attraction is so strong that not even light can escape.
|
| 36 |
+
|
| 37 |
+
As Einstein later said, the reason for the development of general relativity was that the preference of inertial motions within special relativity was unsatisfactory, while a theory which from the outset prefers no state of motion (even accelerated ones) should appear more satisfactory. Consequently, in 1907 he published an article on acceleration under special relativity. In that article titled "On the Relativity Principle and the Conclusions Drawn from It", he argued that free fall is really inertial motion, and that for a free-falling observer the rules of special relativity must apply. This argument is called the equivalence principle. In the same article, Einstein also predicted the phenomena of gravitational time dilation, gravitational redshift and gravitational lensing.
|
| 38 |
+
|
| 39 |
+
In 1911, Einstein published another article "On the Influence of Gravitation on the Propagation of Light" expanding on the 1907 article, in which he estimated the amount of deflection of light by massive bodies. Thus, the theoretical prediction of general relativity could for the first time be tested experimentally.
|
| 40 |
+
|
| 41 |
+
#### Gravitational waves
|
| 42 |
+
|
| 43 |
+
In 1916, Einstein predicted gravitational waves, ripples in the curvature of spacetime which propagate as waves, traveling outward from the source, transporting energy as gravitational radiation. The existence of gravitational waves is possible under general relativity due to its Lorentz invariance which brings the concept of a finite speed of propagation of the physical interactions of gravity with it. By contrast, gravitational waves cannot exist in the Newtonian theory of gravitation, which postulates that the physical interactions of gravity propagate at infinite speed.
|
| 44 |
+
|
| 45 |
+
The first, indirect, detection of gravitational waves came in the 1970s through observation of a pair of closely orbiting neutron stars, PSR B1913+16. The explanation for the decay in their orbital period was that they were emitting gravitational waves. Einstein's prediction was confirmed on 11 February 2016, when researchers at LIGO published the first observation of gravitational waves, detected on Earth on 14 September 2015, nearly one hundred years after the prediction.
|
| 46 |
+
|
| 47 |
+
#### Hole argument and Entwurf theory
|
| 48 |
+
|
| 49 |
+
While developing general relativity, Einstein became confused about the gauge invariance in the theory. He formulated an argument that led him to conclude that a general relativistic field theory is impossible. He gave up looking for fully generally covariant tensor equations and searched for equations that would be invariant under general linear transformations only.
|
| 50 |
+
|
| 51 |
+
In June 1913, the Entwurf ('draft') theory was the result of these investigations. As its name suggests, it was a sketch of a theory, less elegant and more difficult than general relativity, with the equations of motion supplemented by additional gauge fixing conditions. After more than two years of intensive work, Einstein realized that the hole argument was mistaken and abandoned the theory in November 1915.
|
| 52 |
+
|
| 53 |
+
#### Physical cosmology
|
| 54 |
+
|
| 55 |
+
In 1917, Einstein applied the general theory of relativity to the structure of the universe as a whole. He discovered that the general field equations predicted a universe that was dynamic, either contracting or expanding. As observational evidence for a dynamic universe was lacking at the time, Einstein introduced a new term, the cosmological constant, into the field equations, in order to allow the theory to predict a static universe. The modified field equations predicted a static universe of closed curvature, in accordance with Einstein's understanding of Mach's principle in these years. This model became known as the Einstein World or Einstein's static universe.
|
| 56 |
+
|
| 57 |
+
Following the discovery of the recession of the galaxies by Edwin Hubble in 1929, Einstein abandoned his static model of the universe, and proposed two dynamic models of the cosmos, the Friedmann–Einstein universe of 1931 and the Einstein–de Sitter universe of 1932. In each of these models, Einstein discarded the cosmological constant, claiming that it was "in any case theoretically unsatisfactory".
|
| 58 |
+
|
| 59 |
+
In many Einstein biographies, it is claimed that Einstein referred to the cosmological constant in later years as his "biggest blunder", based on a letter George Gamow claimed to have received from him. The astrophysicist Mario Livio has cast doubt on this claim.
|
| 60 |
+
|
| 61 |
+
In late 2013, a team led by the Irish physicist Cormac O'Raifeartaigh discovered evidence that, shortly after learning of Hubble's observations of the recession of the galaxies, Einstein considered a steady-state model of the universe. In a hitherto overlooked manuscript, apparently written in early 1931, Einstein explored a model of the expanding universe in which the density of matter remains constant due to a continuous creation of matter, a process that he associated with the cosmological constant. As he stated in the paper, "In what follows, I would like to draw attention to a solution to equation (1) that can account for Hubbel's [*sic*] facts, and in which the density is constant over time [...] If one considers a physically bounded volume, particles of matter will be continually leaving it. For the density to remain constant, new particles of matter must be continually formed in the volume from space."
|
| 62 |
+
|
| 63 |
+
It thus appears that Einstein considered a steady-state model of the expanding universe many years before Hoyle, Bondi and Gold. However, Einstein's steady-state model contained a fundamental flaw and he quickly abandoned the idea.
|
| 64 |
+
|
| 65 |
+
#### Energy momentum pseudotensor
|
| 66 |
+
|
| 67 |
+
General relativity includes a dynamical spacetime, so it is difficult to see how to identify the conserved energy and momentum. Noether's theorem allows these quantities to be determined from a Lagrangian with translation invariance, but general covariance makes translation invariance into something of a gauge symmetry. The energy and momentum derived within general relativity by Noether's prescriptions do not make a real tensor for this reason.
|
| 68 |
+
|
| 69 |
+
Einstein argued that this is true for a fundamental reason: the gravitational field could be made to vanish by a choice of coordinates. He maintained that the non-covariant energy momentum pseudotensor was, in fact, the best description of the energy momentum distribution in a gravitational field. While the use of non-covariant objects like pseudotensors was criticized by Erwin Schrödinger and others, Einstein's approach has been echoed by physicists including Lev Landau and Evgeny Lifshitz.
|
| 70 |
+
|
| 71 |
+
#### Wormholes
|
| 72 |
+
|
| 73 |
+
In 1935, Einstein collaborated with Nathan Rosen to produce a model of a wormhole, often called Einstein–Rosen bridges. His motivation was to model elementary particles with charge as a solution of gravitational field equations, in line with the program outlined in the paper "Do Gravitational Fields play an Important Role in the Constitution of the Elementary Particles?". These solutions cut and pasted Schwarzschild black holes to make a bridge between two patches. Because these solutions included spacetime curvature without the presence of a physical body, Einstein and Rosen suggested that they could provide the beginnings of a theory that avoided the notion of point particles. However, it was later found that Einstein–Rosen bridges are not stable.
|
| 74 |
+
|
| 75 |
+
#### Einstein–Cartan theory
|
| 76 |
+
|
| 77 |
+
In order to incorporate spinning point particles into general relativity, the affine connection needed to be generalized to include an antisymmetric part, called the torsion. This modification was made by Einstein and Cartan in the 1920s.
|
| 78 |
+
|
| 79 |
+
#### Equations of motion
|
| 80 |
+
|
| 81 |
+
In general relativity, gravitational force is reimagined as curvature of spacetime. A curved path like an orbit is not the result of a force deflecting a body from an ideal straight-line path, but rather the body's attempt to fall freely through a background that is itself curved by the presence of other masses. A remark by John Archibald Wheeler that has become proverbial among physicists summarizes the theory: "Spacetime tells matter how to move; matter tells spacetime how to curve." The Einstein field equations cover the latter aspect of the theory, relating the curvature of spacetime to the distribution of matter and energy. The geodesic equation covers the former aspect, stating that freely falling bodies follow lines that are as straight as possible in a curved spacetime. Einstein regarded this as an "independent fundamental assumption" that had to be postulated in addition to the field equations in order to complete the theory. Believing this to be a shortcoming in how general relativity was originally presented, he wished to derive it from the field equations themselves. Since the equations of general relativity are non-linear, a lump of energy made out of pure gravitational fields, like a black hole, would move on a trajectory which is determined by the Einstein field equations themselves, not by a new law. Accordingly, Einstein proposed that the field equations would determine the path of a singular solution, like a black hole, to be a geodesic. Both physicists and philosophers have often repeated the assertion that the geodesic equation can be obtained from applying the field equations to the motion of a gravitational singularity, but this claim remains disputed.
|
| 82 |
+
|
| 83 |
+
### Quantum mechanics
|
| 84 |
+
|
| 85 |
+
#### Einstein's objections to quantum mechanics
|
| 86 |
+
|
| 87 |
+
Einstein played a major role in developing quantum theory, beginning with his 1905 paper on the photoelectric effect. However, he became displeased with modern quantum mechanics as it had evolved after 1925, despite its acceptance by other physicists. He was skeptical that the randomness of quantum mechanics was fundamental rather than the result of determinism, stating that God "is not playing at dice". Until the end of his life, he continued to maintain that quantum mechanics was incomplete.
|
| 88 |
+
|
| 89 |
+
#### Bohr versus Einstein
|
| 90 |
+
|
| 91 |
+
The Bohr–Einstein debates were a series of public disputes about quantum mechanics between Einstein and Niels Bohr, who were two of its founders. Their debates are remembered because of their importance to the philosophy of science. Their debates would influence later interpretations of quantum mechanics.
|
| 92 |
+
|
| 93 |
+
#### Einstein–Podolsky–Rosen paradox
|
| 94 |
+
|
| 95 |
+
Einstein never fully accepted quantum mechanics. While he recognized that it made correct predictions, he believed a more fundamental description of nature must be possible. Over the years he presented multiple arguments to this effect, but the one he preferred most dated to a debate with Bohr in 1930. Einstein suggested a thought experiment in which two objects are allowed to interact and then moved apart a great distance from each other. The quantum-mechanical description of the two objects is a mathematical entity known as a wavefunction. If the wavefunction that describes the two objects before their interaction is given, then the Schrödinger equation provides the wavefunction that describes them after their interaction. But because of what would later be called quantum entanglement, measuring one object would lead to an instantaneous change of the wavefunction describing the other object, no matter how far away it is. Moreover, the choice of which measurement to perform upon the first object would affect what wavefunction could result for the second object. Einstein reasoned that no influence could propagate from the first object to the second instantaneously fast. Indeed, he argued, physics depends on being able to tell one thing apart from another, and such instantaneous influences would call that into question. Because the true "physical condition" of the second object could not be immediately altered by an action done to the first, Einstein concluded, the wavefunction could not be that true physical condition, only an incomplete description of it.
|
| 96 |
+
|
| 97 |
+
A more famous version of this argument came in 1935, when Einstein published a paper with Boris Podolsky and Nathan Rosen that laid out what would become known as the EPR paradox. In this thought experiment, two particles interact in such a way that the wavefunction describing them is entangled. Then, no matter how far the two particles were separated, a precise position measurement on one particle would imply the ability to predict, perfectly, the result of measuring the position of the other particle. Likewise, a precise momentum measurement of one particle would result in an equally precise prediction for of the momentum of the other particle, without needing to disturb the other particle in any way. They argued that no action taken on the first particle could instantaneously affect the other, since this would involve information being transmitted faster than light, which is forbidden by the theory of relativity. They invoked a principle, later known as the "EPR criterion of reality", positing that: "If, without in any way disturbing a system, we can predict with certainty (i.e., with probability equal to unity) the value of a physical quantity, then there exists an element of reality corresponding to that quantity." From this, they inferred that the second particle must have a definite value of both position and of momentum prior to either quantity being measured. But quantum mechanics considers these two observables incompatible and thus does not associate simultaneous values for both to any system. Einstein, Podolsky, and Rosen therefore concluded that quantum theory does not provide a complete description of reality.
|
| 98 |
+
|
| 99 |
+
In 1964, John Stewart Bell carried the analysis of quantum entanglement much further. He deduced that if measurements are performed independently on the two separated particles of an entangled pair, then the assumption that the outcomes depend upon hidden variables within each half implies a mathematical constraint on how the outcomes on the two measurements are correlated. This constraint would later be called a Bell inequality. Bell then showed that quantum physics predicts correlations that violate this inequality. Consequently, the only way that hidden variables could explain the predictions of quantum physics is if they are "nonlocal", which is to say that somehow the two particles are able to interact instantaneously no matter how widely they ever become separated. Bell argued that because an explanation of quantum phenomena in terms of hidden variables would require nonlocality, the EPR paradox "is resolved in the way which Einstein would have liked least".
|
| 100 |
+
|
| 101 |
+
Despite this, and although Einstein personally found the argument in the EPR paper overly complicated, that paper became among the most influential papers published in *Physical Review*. It is considered a centerpiece of the development of quantum information theory.
|
| 102 |
+
|
| 103 |
+
### Unified field theory
|
| 104 |
+
|
| 105 |
+
Encouraged by his success with general relativity, Einstein sought an even more ambitious geometrical theory that would treat gravitation and electromagnetism as aspects of a single entity. In 1950, he described his unified field theory in a *Scientific American* article titled "On the Generalized Theory of Gravitation". His attempt to find the most fundamental laws of nature won him praise but not success: a particularly conspicuous blemish of his model was that it did not accommodate the strong and weak nuclear forces, neither of which was well understood until many years after his death. Although most researchers now believe that Einstein's approach to unifying physics was mistaken, his goal of a theory of everything is one to which his successors still aspire.
|
| 106 |
+
|
| 107 |
+
## In popular culture
|
| 108 |
+
|
| 109 |
+
Einstein became one of the most famous scientific celebrities after the confirmation of his general theory of relativity in 1919. Although most of the public had little understanding of his work, he was widely recognized and admired. In the period before World War II, *The New Yorker* published a vignette in their "The Talk of the Town" feature saying that Einstein was so well known in America that he would be stopped on the street by people wanting him to explain "that theory". Eventually he came to cope with unwanted enquirers by pretending to be someone else: "Pardon me, sorry! Always I am mistaken for Professor Einstein."
|
| 110 |
+
|
| 111 |
+
Einstein has been the subject of or inspiration for many novels, films, plays, and works of music. He is a favorite model for depictions of absent-minded professors; his expressive face and distinctive hairstyle have been widely copied and exaggerated. *Time* magazine's Frederic Golden wrote that Einstein was "a cartoonist's dream come true". His intellectual achievements and originality have made *Einstein* broadly synonymous with *genius*.
|
| 112 |
+
|
| 113 |
+
## Awards and honors
|
| 114 |
+
|
| 115 |
+
Einstein received numerous awards and honors, and in 1922, he was awarded the 1921 Nobel Prize in Physics "for his services to Theoretical Physics, and especially for his discovery of the law of the photoelectric effect". None of the nominations in 1921 met the criteria set by Alfred Nobel, so the 1921 prize was carried forward and awarded to Einstein in 1922.
|
| 116 |
+
|
| 117 |
+
Einsteinium, a synthetic chemical element, was named in his honor in 1955, a few months after his death.
|
2.txt
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
#
|
| 3 |
+
# Exceptions and other classes
|
| 4 |
+
#
|
| 5 |
+
|
| 6 |
+
class ExceededContextLengthException(Exception):
|
| 7 |
+
"""Exception raised when an input exceeds a model's context length"""
|
| 8 |
+
|
| 9 |
+
class _LlamaStopwatch:
|
| 10 |
+
"""Track elapsed time for prompt processing and text generation"""
|
| 11 |
+
#
|
| 12 |
+
# Q: why don't you use llama_perf_context?
|
| 13 |
+
#
|
| 14 |
+
# A: comments in llama.h state to only use that in llama.cpp examples,
|
| 15 |
+
# and to do your own performance measurements instead.
|
| 16 |
+
#
|
| 17 |
+
# trying to use llama_perf_context leads to output with
|
| 18 |
+
# "0.00 ms per token" and "inf tokens per second"
|
| 19 |
+
#
|
| 20 |
+
def __init__(self):
|
| 21 |
+
self.pp_start_time = None
|
| 22 |
+
self.tg_start_time = None
|
| 23 |
+
self.wall_start_time = None
|
| 24 |
+
self.generic_start_time = None
|
| 25 |
+
self.pp_elapsed_time = 0
|
| 26 |
+
self.tg_elapsed_time = 0
|
| 27 |
+
self.wall_elapsed_time = 0
|
| 28 |
+
self.generic_elapsed_time = 0
|
| 29 |
+
self.n_pp_tokens = 0
|
| 30 |
+
self.n_tg_tokens = 0
|
| 31 |
+
|
| 32 |
+
def start_pp(self):
|
| 33 |
+
"""Start prompt processing stopwatch"""
|
| 34 |
+
self.pp_start_time = time.time_ns()
|
| 35 |
+
|
| 36 |
+
def stop_pp(self):
|
| 37 |
+
"""Stop prompt processing stopwatch"""
|
| 38 |
+
if self.pp_start_time is not None:
|
| 39 |
+
self.pp_elapsed_time += time.time_ns() - self.pp_start_time
|
| 40 |
+
self.pp_start_time = None
|
| 41 |
+
|
| 42 |
+
def start_tg(self):
|
| 43 |
+
"""Start text generation stopwatch"""
|
| 44 |
+
self.tg_start_time = time.time_ns()
|
| 45 |
+
|
| 46 |
+
def stop_tg(self):
|
| 47 |
+
"""Stop text generation stopwatch"""
|
| 48 |
+
if self.tg_start_time is not None:
|
| 49 |
+
self.tg_elapsed_time += time.time_ns() - self.tg_start_time
|
| 50 |
+
self.tg_start_time = None
|
| 51 |
+
|
| 52 |
+
def start_wall_time(self):
|
| 53 |
+
"""Start wall-time stopwatch"""
|
| 54 |
+
self.wall_start_time = time.time_ns()
|
| 55 |
+
|
| 56 |
+
def stop_wall_time(self):
|
| 57 |
+
"""Stop wall-time stopwatch"""
|
| 58 |
+
if self.wall_start_time is not None:
|
| 59 |
+
self.wall_elapsed_time += time.time_ns() - self.wall_start_time
|
| 60 |
+
self.wall_start_time = None
|
| 61 |
+
|
| 62 |
+
def start_generic(self):
|
| 63 |
+
"""Start generic stopwatch (not shown in print_stats)"""
|
| 64 |
+
self.generic_start_time = time.time_ns()
|
| 65 |
+
|
| 66 |
+
def stop_generic(self):
|
| 67 |
+
"""Stop generic stopwatch"""
|
| 68 |
+
if self.generic_start_time is not None:
|
| 69 |
+
self.generic_elapsed_time += time.time_ns() - self.generic_start_time
|
| 70 |
+
self.generic_start_time = None
|
| 71 |
+
|
| 72 |
+
def get_elapsed_time_pp(self) -> int:
|
| 73 |
+
"""Total nanoseconds elapsed during prompt processing"""
|
| 74 |
+
return self.pp_elapsed_time
|
| 75 |
+
|
| 76 |
+
def get_elapsed_time_tg(self) -> int:
|
| 77 |
+
"""Total nanoseconds elapsed during text generation"""
|
| 78 |
+
return self.tg_elapsed_time
|
| 79 |
+
|
| 80 |
+
def get_elapsed_wall_time(self) -> int:
|
| 81 |
+
"""Total wall-time nanoseconds elapsed"""
|
| 82 |
+
return self.wall_elapsed_time
|
| 83 |
+
|
| 84 |
+
def get_elapsed_time_generic(self) -> int:
|
| 85 |
+
"""Total generic nanoseconds elapsed"""
|
| 86 |
+
return self.generic_elapsed_time
|
| 87 |
+
|
| 88 |
+
def increment_pp_tokens(self, n: int):
|
| 89 |
+
if n < 0:
|
| 90 |
+
raise ValueError('negative increments are not allowed')
|
| 91 |
+
self.n_pp_tokens += n
|
| 92 |
+
|
| 93 |
+
def increment_tg_tokens(self, n: int):
|
| 94 |
+
if n < 0:
|
| 95 |
+
raise ValueError('negative increments are not allowed')
|
| 96 |
+
self.n_tg_tokens += n
|
| 97 |
+
|
| 98 |
+
def reset(self):
|
| 99 |
+
"""Reset the stopwatch to its original state"""
|
| 100 |
+
self.pp_start_time = None
|
| 101 |
+
self.tg_start_time = None
|
| 102 |
+
self.wall_start_time = None
|
| 103 |
+
self.generic_start_time = None
|
| 104 |
+
self.pp_elapsed_time = 0
|
| 105 |
+
self.tg_elapsed_time = 0
|
| 106 |
+
self.wall_elapsed_time = 0
|
| 107 |
+
self.generic_elapsed_time = 0
|
| 108 |
+
self.n_pp_tokens = 0
|
| 109 |
+
self.n_tg_tokens = 0
|
| 110 |
+
|
| 111 |
+
def print_stats(self):
|
| 112 |
+
"""Print performance statistics using current stopwatch state
|
| 113 |
+
|
| 114 |
+
#### NOTE:
|
| 115 |
+
The `n_tg_tokens` value will be equal to the number of calls to
|
| 116 |
+
llama_decode which have a batch size of 1, which is technically not
|
| 117 |
+
always equal to the number of tokens generated - it may be off by one."""
|
| 118 |
+
|
| 119 |
+
print(f"\n", end='', file=sys.stderr, flush=True)
|
| 120 |
+
|
| 121 |
+
if self.n_pp_tokens + self.n_tg_tokens == 0:
|
| 122 |
+
print_stopwatch(f'print_stats was called but no tokens were processed or generated')
|
| 123 |
+
|
| 124 |
+
if self.n_pp_tokens > 0:
|
| 125 |
+
pp_elapsed_ns = self.get_elapsed_time_pp()
|
| 126 |
+
pp_elapsed_ms = pp_elapsed_ns / 1e6
|
| 127 |
+
pp_elapsed_s = pp_elapsed_ns / 1e9
|
| 128 |
+
pp_tps = self.n_pp_tokens / pp_elapsed_s
|
| 129 |
+
print_stopwatch(
|
| 130 |
+
f'prompt processing: {self.n_pp_tokens:>7} tokens in {pp_elapsed_ms:>13.3f}ms '
|
| 131 |
+
f'({pp_tps:>10.2f} tok/s)'
|
| 132 |
+
)
|
| 133 |
+
|
| 134 |
+
if self.n_tg_tokens > 0:
|
| 135 |
+
tg_elapsed_ns = self.get_elapsed_time_tg()
|
| 136 |
+
tg_elapsed_ms = tg_elapsed_ns / 1e6
|
| 137 |
+
tg_elapsed_s = tg_elapsed_ns / 1e9
|
| 138 |
+
tg_tps = self.n_tg_tokens / tg_elapsed_s
|
| 139 |
+
print_stopwatch(
|
| 140 |
+
f' text generation: {self.n_tg_tokens:>7} tokens in {tg_elapsed_ms:>13.3f}ms '
|
| 141 |
+
f'({tg_tps:>10.2f} tok/s)'
|
| 142 |
+
)
|
| 143 |
+
|
| 144 |
+
wall_elapsed_ns = self.get_elapsed_wall_time()
|
| 145 |
+
wall_elapsed_ms = wall_elapsed_ns / 1e6
|
| 146 |
+
print_stopwatch(f" wall time:{' ' * 19}{wall_elapsed_ms:>13.3f}ms")
|
| 147 |
+
|
3.txt
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Join us in a celebration of the small things, with a dedicated sizecoding demoparty / event, held on the weekend of 15-16th February 2025 on Discord and Twitch ( https://www.twitch.tv/lovebytedemoparty )
|
| 2 |
+
|
| 3 |
+
This year, our theme is Blind Date. All competitions entries will be shown without their creators' names, so get ready to admire the anonymous!
|
| 4 |
+
|
| 5 |
+
We'll have intro competitions in different size categories, from 32 bytes to 1024 bytes.
|
| 6 |
+
Alongside our Tiny Executable Graphics and Music competitions to Tiny Graphics or Graphics (covering both executable and text graphics) and Bytebeat Music competitions. Have an 8 or 16 byte intro, or a nanogame to show? We've got a Wild Showcase for you!
|
| 7 |
+
|
| 8 |
+
We'll have size-coded related seminars to get you started, a Bytejam, Introshows, DJ Sets and other goodies.
|
| 9 |
+
|
| 10 |
+
We welcome everyone from newcomers to veterans and are open to all platforms. From oldschool Atari, Commodore, Amstrad & ZX Spectrum to High-end and Fantasy Console platforms.
|
| 11 |
+
|
| 12 |
+
This is the one event where size does matter! Don't miss it!
|
| 13 |
+
|
| 14 |
+
https://lovebyte.party
|
| 15 |
+
|
| 16 |
+
[Submitted by lovebyte]
|
4.txt
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Правовая информация
|
| 2 |
+
|
| 3 |
+
Онлайн-ресурс radiopotok.ru не осуществляет вещания, трансляцию и ретрансляцию радиостанций.
|
| 4 |
+
|
| 5 |
+
Наш сайт предоставляет возможность прослушать онлайн радио, используя сторонние серверы, на которых уже установлено программное обеспечения для вещания.
|
| 6 |
+
|
| 7 |
+
Сервис radiopotok.ru никак не связан с аудио-потоками, проходящими через плеер, установленный на сайте.
|
| 8 |
+
|
| 9 |
+
Код плеера взят из открытых источников и воспроизводится исключительно на компьютере конечного пользователя посредством интернет-браузера. Сайт radiopotok.ru только предоставляет перечень онлайн потоков, доступных в открытых источниках.
|
| 10 |
+
|
| 11 |
+
Однако, если, по Вашему мнению, воспроизведение какого-либо потока нарушает чьи-то права, свяжитесь с администрацией сайта.
|
| 12 |
+
|
| 13 |
+
Мы всегда готовы разобрать любую ситуацию и подходим к каждому вопросу индивидуально.
|
| 14 |
+
|
| 15 |
+
Если Вами обнаружено прямое нарушение авторского права, либо создалась конфликтная ситуация, свяжитесь с нашим представителем для решения вопроса по электронной почте [email protected].
|
| 16 |
+
|
| 17 |
+
Торговые марки, знаки и логотипы, прошедшие официальную регистрацию, принадлежат их владельцам.
|
| 18 |
+
|
| 19 |
+
Любое использование на ресурсе radiopotok.ru таких объектов авторского права, включая названия организаций, которые являются их собственниками, преследует информационные цели.
|
| 20 |
+
|
| 21 |
+
Все материалы на radiopotok.ru представлены только для ознакомления и не подлежат скачиванию и продаже.
|
| 22 |
+
|
| 23 |
+
В случае обнаружения Вами фото-, видео-, аудио- и прочих материалов на ресурсе radiopotok.ru, авторскими правами на которые владеете Вы, и которые используются без согласия и ссылки на их обладателя, просим Вас написать нам по электронной почте [email protected] с официального почтового домена правообладателя.
|
5.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
|
| 3 |
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ac libero mauris. Integer tincidunt egestas erat nec lobortis. Aenean ullamcorper fermentum mi, sed finibus mi pharetra lobortis. Quisque sed faucibus mauris, eget molestie dui. Nullam ante erat, egestas a consectetur ut, consequat nec lacus. Praesent molestie vel nunc sit amet ultrices. Duis iaculis mollis lectus, pretium accumsan ipsum commodo sit amet. Ut diam turpis, gravida non euismod at, porttitor at nibh. Sed sed lorem imperdiet, tempor risus ultrices, aliquam lorem. Curabitur non enim non est accumsan mollis. Aenean quis lacus gravida, fermentum neque a, euismod massa.
|
| 4 |
+
|
| 5 |
+
Vivamus id leo non nulla ullamcorper lacinia. Nunc interdum maximus orci id placerat. In eget tellus urna. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam ac eros in odio scelerisque aliquam eu hendrerit est. Nulla vel viverra erat. Duis cursus lobortis luctus.
|
| 6 |
+
|
| 7 |
+
Quisque convallis risus id nisl cursus aliquet. Quisque egestas porttitor diam sed tristique. Sed lacinia tincidunt neque eu scelerisque. Fusce ac vehicula lectus, a consequat elit. Sed euismod tristique tempus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec lacinia fermentum odio, nec dictum eros. Etiam vestibulum tincidunt lectus ac scelerisque. Integer et tincidunt neque. Praesent velit tellus, congue quis massa at, viverra ultricies ligula. In gravida tortor vel luctus varius. Aliquam volutpat, felis vel laoreet mattis, eros ligula sagittis tortor, a mollis leo massa vel leo. Quisque rhoncus dui eget sagittis dictum. Nunc sed felis sem. Donec at sagittis mauris, vel consectetur ante.
|
| 8 |
+
|
| 9 |
+
Nullam condimentum sagittis odio, sit amet bibendum dolor pellentesque sit amet. Pellentesque suscipit odio libero, nec sollicitudin velit lobortis quis. Fusce tincidunt risus risus, vitae ornare erat dignissim at. Duis sagittis mollis dignissim. Ut ex erat, elementum in dolor et, facilisis ullamcorper turpis. Proin luctus pharetra libero. Proin ut dapibus felis. Donec rutrum pretium lectus, ac commodo quam consectetur id.
|
| 10 |
+
|
| 11 |
+
Sed interdum tincidunt pellentesque. Aliquam interdum lorem elementum euismod gravida. Mauris ut commodo neque, ut faucibus tellus. Nam scelerisque finibus dictum. Donec viverra risus et dui facilisis, at blandit dolor cursus. Aliquam blandit ex sit amet neque sagittis, a interdum est molestie. Cras nec arcu eros. Duis et neque a sapien molestie pellentesque. Praesent vel lectus in dui commodo vestibulum. Quisque purus metus, aliquet sed lacus nec, viverra aliquet purus. Vestibulum consectetur enim ut nulla fringilla rutrum. Cras ullamcorper elit quis mauris tempus ullamcorper.
|
| 12 |
+
|
| 13 |
+
Morbi feugiat odio id dolor convallis, quis maximus turpis viverra. Mauris pulvinar sapien at orci iaculis, non iaculis lorem congue. Mauris vestibulum eros in tellus bibendum, mattis scelerisque massa convallis. In hac habitasse platea dictumst. Etiam aliquam tincidunt viverra. Nunc sit amet turpis et tellus luctus accumsan volutpat et odio. Sed faucibus nibh et gravida feugiat. Mauris ultricies, lacus quis iaculis tincidunt, nunc felis tempus neque, at facilisis metus augue sit amet magna. Pellentesque sed ipsum augue. Donec placerat eros turpis, ac vestibulum massa accumsan sit amet. Proin laoreet libero vel vestibulum imperdiet. Cras nec fringilla odio. Proin facilisis sit amet lorem at blandit.
|
| 14 |
+
|
| 15 |
+
Donec malesuada neque id porta mollis. Morbi molestie ac turpis non convallis. Nunc at tincidunt dolor. Aliquam augue lorem, aliquet a facilisis non, aliquet vel nisl. Ut porta vestibulum mauris sit amet dapibus. Nulla nec volutpat lacus, ac tincidunt risus. Donec vel metus id lacus faucibus blandit eget at dolor. Maecenas ultricies magna nec mauris lobortis sagittis. Sed ornare, purus condimentum dignissim dignissim, purus velit laoreet dui, at malesuada leo elit id purus. Quisque sagittis justo in nunc pretium luctus eu sed massa. Donec pellentesque magna justo, ut placerat leo condimentum eu. Sed sit amet dapibus lorem. Morbi turpis libero, aliquet vitae lorem at, sodales tincidunt lacus. In elit velit, placerat nec urna in, rhoncus pellentesque quam.
|
| 16 |
+
|
| 17 |
+
Cras non enim dapibus, accumsan arcu vel, dapibus ex. Nulla quis mi rhoncus, pulvinar velit et, faucibus magna. Sed eleifend neque ac congue commodo. Sed ac metus at arcu ultrices tempor. Nam enim sapien, interdum eu iaculis id, maximus eu mauris. Fusce porttitor semper mi quis dignissim. Donec non erat nibh.
|
| 18 |
+
|
| 19 |
+
Vivamus bibendum pellentesque ex, ut mollis odio pretium vitae. Nam vel sapien velit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec finibus suscipit neque, ac malesuada velit. Morbi sodales ex eget nisl volutpat luctus sed eget purus. Duis ac feugiat ligula, non elementum eros. Nullam elit velit, gravida ut consequat imperdiet, scelerisque et enim. Phasellus posuere efficitur posuere.
|
| 20 |
+
|
| 21 |
+
Nullam faucibus augue sit amet neque faucibus sagittis ac a turpis. Maecenas eget leo sit amet augue pellentesque luctus a eu odio. Fusce fringilla et leo a pulvinar. Maecenas ut nibh elementum, tristique leo ac, imperdiet ipsum. Ut augue diam, dignissim et odio eu, venenatis porta felis. Proin ac arcu nulla. Quisque vulputate mauris id libero euismod luctus.
|
6.txt
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
先生们,由于时间有限和环境不利,大多数人离开这个世界时并没有过多思考。那些尝试思考的人会头疼,然后转而做其他事情。我属于第二类人。随着我的职业生涯的发展,我在《名人录》中所占的篇幅越来越多,但无论是最后一期还是未来的任何一期,都不会解释我为何放弃新闻业。这将是我故事的主题,而无论如何,我本来也不会在其他情况下告诉你们。
|
| 2 |
+
我认识一个有才华的男孩,他决定建造一个灵敏的电流计,结果他做得太成功了;他的设备即使没有电流也会移动,对地球表面的震动作出反应。这可以作为我故事的座右铭。我是联合报业国际版夜班编辑。在那里,我忍受了很多,包括报纸排版的自动化。我告别了人类排字工人,转而使用IBM 0161,这是一台专门为排版工作设计的计算机。我后悔自己没有早出生一百五十年。我的故事会以“我引诱了德……伯爵夫人”开始,如果我开始描述我是如何从车夫手中抢过缰绳,鞭打马匹以逃离嫉妒丈夫派来的小混混,我就不必解释伯爵夫人是什么,或者引诱是如何进行的。但现在没那么简单。0161计算机并不是机械排字机。它是一个速度狂魔,通过工程技巧限制其速度,只是为了让我们跟上它的节奏。它可以替代十到十二个人。它直接连接到几十台电传打字机,以便我们通讯员在安卡拉、巴格达或东京打出的任何内容都能立即进入它的电路。计算机清理内容,并在屏幕上显示各种早报版面布局。午夜到凌晨三点之间——这是我们的截稿时间——它可以创建多达五十种不同的版本。轮到值班编辑决定哪个版本付印。如果要求一个人排版师做出五十个,甚至只是五个不同版本,他会疯掉。但计算机比我们任何人都快上百万倍——或者如果它被允许的话。我确实意识到,像这样的评论破坏了我故事的吸引力。如果我不再赞美伯爵夫人乳房的象牙色肌肤,而是开始谈论它们的化学成分,伯爵夫人的魅力还剩多少?对讲故事的人来说,这是艰难的时代;一切触手可及的东西都过时了,而一切令人震惊的东西都需要百科全书的几页和一本大学课本。然而,没有人想出解决办法。
|
| 3 |
+
然而,与IBM的合作令人着迷。每当有新的故事进来——这一切都发生在一间大圆房间里,充斥着电传打字机的咔嗒声——计算机立即将其融入页面布局,当然,这只是在屏幕上。这都是影子游戏,电子的游戏。有些人对失去工作的人感到悲伤。我没有。计算机没有野心,如果在凌晨三点前五分钟最后一条国内新闻缺失,它也不会生气;它不会被家庭烦恼困扰,不需要在月底前借钱,不会累,不会让你觉得它比你更懂一切,如果你要求它把刚才作为标题的内容直接踢到最后一页,用非衬线字体,它也不会生气。但它也是极其苛求的,这一点并不容易察觉。如果你说“不”,那就是一个明确、果断的“不”,是暴君的判决,因为计算机不能不服从!但既然它从不出错,早报中的任何错误都将是人的错误。IBM的创造者考虑到了一切,除了一个小小的细节:无论它们多么平衡、固定,电传打字机都会震动,就像快速打字机一样。由于这些震动,连接我们的电传打字机与计算机的电缆有松动的趋势,最终导致插头断开。这种情况很少发生,也许一个月一两次。这并不是什么大麻烦——你只需要站起来把插头插回去——所以没有人要求更好的插头。我们每个值班编辑都想过这个问题,但没有多少信心。也许现在的插头已经不同了。如果是这样,那么我想告诉你的启示将永远不会重演。
|
| 4 |
+
那是在平安夜。我的版面在凌晨三点前刚刚完成——我喜欢留有几分钟的余地,足够休息和点燃我的烟斗。我感到满意,因为轮转机等待的不是我,而是最新的新闻——那天晚上是关于伊朗的,该国当天早晨发生了地震。通讯社只报道了通讯员电报的一部分,因为第一次震动后紧接着又发生了强烈震动,摧毁了电缆连接。由于无线电也沉默了,我们认为广播站一定已经毁了。我们指望我们的通讯员斯坦·罗杰斯。他身材矮小,像个骑师,知道如何利用这一点;有时他能挤上已经挤满人的军用直升机,因为他体重不超过一个手提箱。屏幕上充满了头版的布局——只有一个空白的白矩形。与伊朗的连接仍然丢失。即使有些电传打字机仍在背景中咔嗒作响,我一听到伊朗电传打字机开始工作,立刻就认出来了。这是经验的问题。令我惊讶的是,白矩形仍然为空,尽管文字应该以与电传打字机打印相同的速度填充。但停顿只持续了一两秒钟。然后,整篇报道同时出现在屏幕上,这让我感到惊讶。我记住了它。标题已经在那里。下面报道说:“当地时间上午十点至十一点之间,舍拉巴德发生了两次七级和八级的地下震动。城市被摧毁。估计死亡人数为1000人,6000人流离失所。”
|
| 5 |
+
我听到了蜂鸣器;打印机提醒我时间已经是凌晨三点。既然这么简短的故事留下了一些空白,我用两句话稀释了一下,然后通过按键将整期报纸发送到印刷室,那里会直接送到铸排机,然后是轮转机。
|
| 6 |
+
我无事可做,于是站起来伸展筋骨。当我重新点燃烟斗时,我注意到地板上有一根电缆。它从一台电传打字机上断开了,那正是罗杰斯使用的安卡拉电传打字机。当我拿起电缆时,一个荒谬的想法闪过我的脑海:如果电传打字机发出声音时电缆已经断开怎么办?这显然是一个荒谬的想法,因为计算机怎么可能在没有连接的情况下写出故事?我慢慢地走到电传打字机前,撕下一张印有信息的纸,举到眼前。我立刻感觉到措辞不同,但像往常一样,这个时间我感到疲倦和散漫,不相信自己的记忆。我再次打开计算机,让它显示头版,并将两个版本进行比较。它们确实不同,尽管差别不大。电传打字机版本写道:
|
| 7 |
+
“当地时间上午十点到十一点之间,舍拉巴德发生了两次余震,震级分别为七级和八级。城市完全被摧毁。死亡人数超过五百人,无家可归者六千人。”
|
7.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
0:1;0,1:4;0,1,4:8;0,1,4,8:13;0,1,4,8,13:19;0,1,4,8,13,19:26;
|
8.txt
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
GGML_ASSERT(hparams.n_embd_head_k % ggml_blck_size(type_k) == 0);
|
| 3 |
+
GGML_ASSERT(hparams.n_embd_head_v % ggml_blck_size(type_v) == 0);
|
| 4 |
+
|
| 5 |
+
if (!hparams.vocab_only) {
|
| 6 |
+
// GPU backends
|
| 7 |
+
for (auto * dev : model->devices) {
|
| 8 |
+
ggml_backend_t backend = ggml_backend_dev_init(dev, nullptr);
|
| 9 |
+
if (backend == nullptr) {
|
| 10 |
+
LLAMA_LOG_ERROR("%s: failed to initialize %s backend\n", __func__, ggml_backend_dev_name(dev));
|
| 11 |
+
llama_free(ctx);
|
| 12 |
+
return nullptr;
|
| 13 |
+
}
|
| 14 |
+
ctx->backends.emplace_back(backend);
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
// add ACCEL backends (such as BLAS)
|
| 18 |
+
for (size_t i = 0; i < ggml_backend_dev_count(); ++i) {
|
| 19 |
+
ggml_backend_dev_t dev = ggml_backend_dev_get(i);
|
| 20 |
+
if (ggml_backend_dev_type(dev) == GGML_BACKEND_DEVICE_TYPE_ACCEL) {
|
| 21 |
+
ggml_backend_t backend = ggml_backend_dev_init(dev, nullptr);
|
| 22 |
+
if (backend == nullptr) {
|
| 23 |
+
LLAMA_LOG_ERROR("%s: failed to initialize %s backend\n", __func__, ggml_backend_dev_name(dev));
|
| 24 |
+
llama_free(ctx);
|
| 25 |
+
return nullptr;
|
| 26 |
+
}
|
| 27 |
+
ctx->backends.emplace_back(backend);
|
| 28 |
+
}
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
// add CPU backend
|
| 32 |
+
ctx->backend_cpu = ggml_backend_init_by_type(GGML_BACKEND_DEVICE_TYPE_CPU, nullptr);
|
| 33 |
+
if (ctx->backend_cpu == nullptr) {
|
| 34 |
+
LLAMA_LOG_ERROR("%s: failed to initialize CPU backend\n", __func__);
|
| 35 |
+
llama_free(ctx);
|
| 36 |
+
return nullptr;
|
| 37 |
+
}
|
| 38 |
+
ctx->backends.emplace_back(ctx->backend_cpu);
|
| 39 |
+
|
| 40 |
+
// create a list of the set_n_threads functions in the backends
|
| 41 |
+
for (auto & backend : ctx->backends) {
|
| 42 |
+
ggml_backend_dev_t dev = ggml_backend_get_device(backend.get());
|
| 43 |
+
ggml_backend_reg_t reg = dev ? ggml_backend_dev_backend_reg(dev) : nullptr;
|
| 44 |
+
if (reg) {
|
| 45 |
+
auto ggml_backend_set_n_threads_fn = (ggml_backend_set_n_threads_t) ggml_backend_reg_get_proc_address(reg, "ggml_backend_set_n_threads");
|
| 46 |
+
if (ggml_backend_set_n_threads_fn) {
|
| 47 |
+
ctx->set_n_threads_fns.emplace_back(backend.get(), ggml_backend_set_n_threads_fn);
|
| 48 |
+
}
|
| 49 |
+
}
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
llama_set_abort_callback(ctx, params.abort_callback, params.abort_callback_data);
|
| 53 |
+
|
| 54 |
+
if (!llama_kv_cache_init(ctx->kv_self, ctx->model, ctx->cparams, type_k, type_v, kv_size, cparams.offload_kqv)) {
|
| 55 |
+
LLAMA_LOG_ERROR("%s: llama_kv_cache_init() failed for self-attention cache\n", __func__);
|
| 56 |
+
llama_free(ctx);
|
| 57 |
+
return nullptr;
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
{
|
| 61 |
+
size_t memory_size_k = 0;
|
| 62 |
+
size_t memory_size_v = 0;
|
| 63 |
+
|
| 64 |
+
for (auto & k : ctx->kv_self.k_l) {
|
| 65 |
+
memory_size_k += ggml_nbytes(k);
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
for (auto & v : ctx->kv_self.v_l) {
|
| 69 |
+
memory_size_v += ggml_nbytes(v);
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
LLAMA_LOG_INFO("%s: KV self size = %7.2f MiB, K (%s): %7.2f MiB, V (%s): %7.2f MiB\n", __func__,
|
| 73 |
+
(float)(memory_size_k + memory_size_v) / (1024.0f * 1024.0f),
|
| 74 |
+
ggml_type_name(type_k), (float)memory_size_k / (1024.0f * 1024.0f),
|
| 75 |
+
ggml_type_name(type_v), (float)memory_size_v / (1024.0f * 1024.0f));
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
// graph outputs buffer
|
| 79 |
+
{
|
| 80 |
+
// resized during inference when a batch uses more outputs
|
| 81 |
+
if (llama_output_reserve(*ctx, params.n_seq_max) < params.n_seq_max) {
|
| 82 |
+
LLAMA_LOG_ERROR("%s: failed to reserve initial output buffer\n", __func__);
|
| 83 |
+
llama_free(ctx);
|
| 84 |
+
return nullptr;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
LLAMA_LOG_INFO("%s: %10s output buffer size = %8.2f MiB\n", __func__,
|
| 88 |
+
ggml_backend_buffer_name(ctx->buf_output.get()),
|
| 89 |
+
ggml_backend_buffer_get_size(ctx->buf_output.get()) / 1024.0 / 1024.0);
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
// scheduler and compute buffers
|
| 93 |
+
{
|
| 94 |
+
// buffer types used for the compute buffer of each backend
|
| 95 |
+
std::vector<ggml_backend_buffer_type_t> backend_buft;
|
| 96 |
+
std::vector<ggml_backend_t> backend_ptrs;
|
| 97 |
+
for (auto & backend : ctx->backends) {
|
| 98 |
+
auto * buft = ggml_backend_get_default_buffer_type(backend.get());
|
| 99 |
+
auto backend_type = ggml_backend_dev_type(ggml_backend_get_device(backend.get()));
|
| 100 |
+
if (backend_type == GGML_BACKEND_DEVICE_TYPE_CPU && !model->devices.empty()) {
|
| 101 |
+
// use the host buffer of the first device CPU for faster transfer of the intermediate state
|
| 102 |
+
auto * dev = model->devices[0];
|
| 103 |
+
auto * host_buft = ggml_backend_dev_host_buffer_type(dev);
|
| 104 |
+
if (host_buft) {
|
| 105 |
+
buft = host_buft;
|
| 106 |
+
}
|
| 107 |
+
}
|
| 108 |
+
backend_buft.push_back(buft);
|
| 109 |
+
backend_ptrs.push_back(backend.get());
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
const size_t max_nodes = model->max_nodes();
|
| 113 |
+
|
| 114 |
+
// buffer used to store the computation graph and the tensor meta data
|
| 115 |
+
ctx->buf_compute_meta.resize(ggml_tensor_overhead()*max_nodes + ggml_graph_overhead_custom(max_nodes, false));
|
| 116 |
+
|
| 117 |
+
// TODO: move these checks to ggml_backend_sched
|
| 118 |
+
// enabling pipeline parallelism in the scheduler increases memory usage, so it is only done when necessary
|
| 119 |
+
bool pipeline_parallel =
|
| 120 |
+
model->n_devices() > 1 &&
|
| 121 |
+
model->params.n_gpu_layers > (int)model->hparams.n_layer &&
|
| 122 |
+
model->params.split_mode == LLAMA_SPLIT_MODE_LAYER &&
|
| 123 |
+
params.offload_kqv;
|
| 124 |
+
|
| 125 |
+
// pipeline parallelism requires support for async compute and events in all devices
|
| 126 |
+
if (pipeline_parallel) {
|
| 127 |
+
for (auto & backend : ctx->backends) {
|
| 128 |
+
auto dev_type = ggml_backend_dev_type(ggml_backend_get_device(backend.get()));
|
| 129 |
+
if (dev_type == GGML_BACKEND_DEVICE_TYPE_CPU) {
|
| 130 |
+
// ignore CPU backend
|
| 131 |
+
continue;
|
| 132 |
+
}
|
| 133 |
+
auto * dev = ggml_backend_get_device(backend.get());
|
| 134 |
+
ggml_backend_dev_props props;
|
| 135 |
+
ggml_backend_dev_get_props(dev, &props);
|
| 136 |
+
if (!props.caps.async || !props.caps.events) {
|
| 137 |
+
// device does not support async compute or events
|
| 138 |
+
pipeline_parallel = false;
|
| 139 |
+
break;
|
| 140 |
+
}
|
| 141 |
+
}
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
ctx->sched.reset(ggml_backend_sched_new(backend_ptrs.data(), backend_buft.data(), backend_ptrs.size(), max_nodes, pipeline_parallel));
|
| 145 |
+
|
| 146 |
+
if (pipeline_parallel) {
|
| 147 |
+
LLAMA_LOG_INFO("%s: pipeline parallelism enabled (n_copies=%d)\n", __func__, ggml_backend_sched_get_n_copies(ctx->sched.get()));
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
// initialize scheduler with the worst-case graph
|
| 151 |
+
uint32_t n_seqs = 1; // TODO: worst-case number of sequences
|
| 152 |
+
uint32_t n_tokens = std::min(cparams.n_ctx, cparams.n_ubatch);
|
| 153 |
+
llama_token token = ctx->model.vocab.token_bos(); // not actually used by llama_build_graph, but required to choose between token and embedding inputs graph
|
| 154 |
+
|
| 155 |
+
llama_ubatch ubatch_pp = { true, n_tokens, n_tokens / n_seqs, n_seqs, &token, nullptr, nullptr, nullptr, nullptr, nullptr};
|
| 156 |
+
ggml_cgraph * gf_pp = llama_build_graph(*ctx, ubatch_pp, true);
|
| 157 |
+
|
| 158 |
+
// reserve pp graph first so that buffers are only allocated once
|
| 159 |
+
ggml_backend_sched_reserve(ctx->sched.get(), gf_pp);
|
| 160 |
+
int n_splits_pp = ggml_backend_sched_get_n_splits(ctx->sched.get());
|
| 161 |
+
int n_nodes_pp = ggml_graph_n_nodes(gf_pp);
|
| 162 |
+
|
| 163 |
+
// reserve with tg graph to get the number of splits and nodes
|
| 164 |
+
llama_ubatch ubatch_tg = { true, 1, 1, n_seqs, &token, nullptr, nullptr, nullptr, nullptr, nullptr};
|
| 165 |
+
ggml_cgraph * gf_tg = llama_build_graph(*ctx, ubatch_tg, true);
|
| 166 |
+
ggml_backend_sched_reserve(ctx->sched.get(), gf_tg);
|
| 167 |
+
int n_splits_tg = ggml_backend_sched_get_n_splits(ctx->sched.get());
|
| 168 |
+
int n_nodes_tg = ggml_graph_n_nodes(gf_tg);
|
| 169 |
+
|
| 170 |
+
// reserve again with pp graph to avoid ggml-alloc reallocations during inference
|
| 171 |
+
gf_pp = llama_build_graph(*ctx, ubatch_pp, true);
|
| 172 |
+
if (!ggml_backend_sched_reserve(ctx->sched.get(), gf_pp)) {
|
| 173 |
+
LLAMA_LOG_ERROR("%s: failed to allocate compute buffers\n", __func__);
|
| 174 |
+
llama_free(ctx);
|
| 175 |
+
return nullptr;
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
for (size_t i = 0; i < backend_ptrs.size(); ++i) {
|
| 179 |
+
ggml_backend_t backend = backend_ptrs[i];
|
| 180 |
+
ggml_backend_buffer_type_t buft = backend_buft[i];
|
| 181 |
+
size_t size = ggml_backend_sched_get_buffer_size(ctx->sched.get(), backend);
|
| 182 |
+
if (size > 1) {
|
| 183 |
+
LLAMA_LOG_INFO("%s: %10s compute buffer size = %8.2f MiB\n", __func__,
|
| 184 |
+
ggml_backend_buft_name(buft),
|
| 185 |
+
size / 1024.0 / 1024.0);
|
| 186 |
+
}
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
if (n_nodes_pp == n_nodes_tg) {
|
| 190 |
+
LLAMA_LOG_INFO("%s: graph nodes = %d\n", __func__, n_nodes_pp);
|
| 191 |
+
} else {
|
| 192 |
+
LLAMA_LOG_INFO("%s: graph nodes = %d (with bs=%d), %d (with bs=1)\n", __func__, n_nodes_pp, n_tokens, n_nodes_tg);
|
| 193 |
+
}
|
| 194 |
+
if (n_splits_pp == n_splits_tg) {
|
| 195 |
+
LLAMA_LOG_INFO("%s: graph splits = %d\n", __func__, n_splits_pp);
|
| 196 |
+
} else {
|
| 197 |
+
LLAMA_LOG_INFO("%s: graph splits = %d (with bs=%d), %d (with bs=1)\n", __func__, n_splits_pp, n_tokens, n_splits_tg);
|
| 198 |
+
}
|
| 199 |
+
}
|
| 200 |
+
}
|
9.txt
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Every Asshole Does Good Before Exiting
|
| 2 |
+
Jake Rhodes
|
| 3 |
+
|
| 4 |
+
Two months ago I was finishing up a season of Love is Blind with my girlfriend. Watching a bunch of twenty-somethings get betrothed after sharing intimate secrets and laughs behind a piece of foggy piece of plexiglass like some sort of weird, fucked up 21st century confession booth was good enough for me in terms of a distraction from what had occurred the previous two months.
|
| 5 |
+
My dad David (who many of you reading this may know as a weird trickster ambivalent demi-god character based on stories, posts, and podcast episodes) was nothing short of a force of nature. Those around him were often subject to his mood swings, benders, bad jokes, fuckups, and moments of both genetic and drug-induced psychosis. Throughout my childhood, he floated around like like a shithoused apparition. Plastered poltergeist. There, not there, door flies open, door slams shut, pan goes flying. “Anybody seen my cigarettes” would echo from nowhere and everywhere inside the trailer, apartment, or house that we called home for however long it took us to either get evicted, foreclosed on, or decide on a “fresh start” which was usually a 5 minute drive from where we had just left off.
|
| 6 |
+
There were a lot of bad moments, far too many to count or throw in a Google doc in a stupid, silly attempt at both something resembling catharsis and my lack of desire to put together a bed frame. But, there was a common theme. My dad was a profoundly unwell human being. His addictions aside (of which there were several) he suffered greatly from bipolar disorder, psychosis, paranoid delusions, and fits of intense depression that would leave him bedridden long after the drugs wore off and his tabs were closed out. In especially darker moments, he would tell my mother, brother, and me that the family was cursed. Doomed. That his soul was tainted by some dark, unknown force and that somewhere along the family line we must have angered a witch or some woodland spirit. Because we were forever and unequivocally fucked. Nothing to be done. His father, a mean as fuck drunk raised by someone ten times meaner and ten times drunker, passed when he was 9 years old of melanoma. And on and on back and back along the paternal line was suffering caused by either the consequences of a man’s birth or the stupid choices he makes when he drinks 28 beers in a sitting and starts rifling through medicine cabinets. Or both. In that way, I guess I could see why my dad would find himself believing that the family was “cursed.”
|
| 7 |
+
When I was 14, he admitted himself to a hospital and was moved around place to place for several months. He had “found god” prior to this, but not in a Hallmark way. More of in a desperate, dot-connecting, delusional way that sometimes sad people succumb to when they are looking for an answer as to why their brains don’t function normally. Why they can’t hold down jobs, love other people as they are loved, etc. In his delusions, he confided in my mother that the only solution was for him to kill himself. That would stop the curse. That would break whatever spell was placed on us.
|
| 8 |
+
After several months, the delusions subsided. Things got better. He, of course, was still Dave. The partying, hard-drinking hurricane of a man that I had known my whole life. As I reached my late teens I had such a deep resentment for him. I hated him for his behavior, for his treatment of me and my mother and brother, for his apathy and his anger, and all the things in between. I would find myself drunker than fuck, speech slurred, angry and hurtful words stumbling out of my mouth. And he would cry and say he was sorry. And we would be fine for a little while.
|
| 9 |
+
When I got heavily into drugs shortly thereafter, weirdly enough, we had established a type of common ground. At long last. All it had taken me was getting really into the medication they give to end-stage leukemia patients and, of course, cocaine. We built a rapport out of that and things were pretty good for a while. We worked a construction job together. Played music. Wrote songs. I eventually graduated with my Master’s and he was there with my mother and brother. A few pounds heavier and a few less teeth, but still there nonetheless. He was incredibly supportive of my band. My podcast. Stand-up. He would check in and ask how things were going. He’d text me just to let me know he lost another tooth eating chicken wings and that “he really only needed the back ones anyway” which I never quite understood. Through this new relationship born out of my own misery, bad decisions, and the consequences of my birth, I was able to better recall the nicer moments we had.
|
| 10 |
+
Starting around the end of May, early Juneish, my dad got really bad again. Worse than he was 14 years prior where he was convinced that the universe was hellbent on sending him to hell and there was only one solution. He would call me and tell me that he had spent the entire day drinking. From the moment he woke up to the moment he went to work. He would tell me that his sister was his handler. She was in on it and orchestrating the entire process. The destruction of him and our family’s souls. Now, I knew that my Aunt spent her days working admin for a hospital and putting up Greg Abbott signs as she had done for the last 10 years or so. And I would try my best to explain this to him. To tell him that he was withdrawing, that he was in fight-or-flight mode. His brain is trying to connect things that aren’t there because it is trying to find some “escape route” or solution to the suffering and paranoia. But, it got worse. I got him into several facilities. Bounced around from place to place for a couple months. Until one night, after a stupid season of Love is Blind, I got a call from my aunt telling me that my dad had hung himself. He left no note. He told no one. Got drunk alone and hung himself in the home of a family friend where he was staying while he adjusted to the new medication that he had been given at the hospital.
|
| 11 |
+
I spent the next month, basically up until mid August, hopelessly drunk, angry, and miserable. All the anger and resentment I had kind of stowed away somewhere in my head was thrust to the front of my mind. Why? Why the fuck would he do this to me. To my mom. To my brother. That eventually turned into hatred of myself. That I didn’t do enough. That I didn’t try hard enough to save my dad from this thing that he never really beat and mostly just kept quiet by feeding it alcohol and drugs his whole life. I found myself thinking I somehow should have known. Should have kicked the door down and saved him and it’s my fault that he’s dead.
|
| 12 |
+
And then that brings me to now. Writing this. I guess a lot of that bad stuff has mostly subsided. I have been able to find those good moments again. Listening to Metallica in a hot garage, stoned as shit, laughing until my lungs gave out because my dad was singing Master of Puppets in a Chinese guy voice.
|
| 13 |
+
My favorite memory I think I have of him is when I was about 9 or 10 years old. My parents had gotten into a pretty nasty fight and my dad had moved back in with his mom. I remember being frustrated, not at the fight weirdly enough, but at the fact that I couldn’t remember the names of the guitar strings and how to make chord shapes. My dad, a lifelong guitar player and a pretty good one, would sit there and repeat like a mantra “E A D G B E. It’s easy Jacob. 6 strings. 6 letters.” And I for the life of me couldn’t fucking commit it to memory. And my Dad, in his infinite childish wisdom, came up with a little sentence that has stuck with me forever and finally allowed me to remember the names of the strings. “Check this out. Every Asshole Does Good Before Exiting. E A D G B E. Think of it like that.”
|
| 14 |
+
Now that he’s gone, I can’t help but think it wasn’t just a stupid trick to get his son to remember the names of guitar strings.
|
tensor_type_testing.txt
ADDED
|
@@ -0,0 +1,449 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
---
|
| 3 |
+
|
| 4 |
+
# Tensor Type Testing
|
| 5 |
+
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
## Quantization naming scheme:
|
| 9 |
+
|
| 10 |
+
```
|
| 11 |
+
Model-Name-E{TYPE_EMBD}-F{TYPE_FFN}-A{TYPE_ATTN}-O{TYPE_OUTPUT}.gguf
|
| 12 |
+
```
|
| 13 |
+
|
| 14 |
+
for example `Llama-3.1-8B-Instruct-EQ4_K-FQ4_K-AQ8_0-OQ8_0.gguf`:
|
| 15 |
+
- Model is Llama 3.1 8B Instruct
|
| 16 |
+
- TYPE_EMBD (token embeddings) are in Q4_K
|
| 17 |
+
- TYPE_FFN (MLP / feed-forward tensors) are in Q4_K
|
| 18 |
+
- TYPE_ATTN (K,Q,V attention and attention output tensors) are in Q8_0
|
| 19 |
+
- TYPE_OUTPUT (output tensor) is in Q8_0
|
| 20 |
+
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
## Command template:
|
| 24 |
+
|
| 25 |
+
```bash
|
| 26 |
+
TYPE_EMBD=GGML_TYPE
|
| 27 |
+
TYPE_FFN=GGML_TYPE
|
| 28 |
+
TYPE_ATTN=GGML_TYPE
|
| 29 |
+
TYPE_OUTPUT=GGML_TYPE
|
| 30 |
+
SRC_GGUF=/my/model/orig.gguf
|
| 31 |
+
DST_GGUF=/my/model/quant.gguf
|
| 32 |
+
N_THREADS=4
|
| 33 |
+
|
| 34 |
+
./llama.cpp/build/bin/llama-quantize --token-embedding-type $TYPE_EMBD --tensor-type ffn_down=$TYPE_FFN --tensor-type ffn_gate=$TYPE_FFN --tensor-type ffn_up=$TYPE_FFN --tensor-type attn_k=$TYPE_ATTN --tensor-type attn_q=$TYPE_ATTN --tensor-type attn_v=$TYPE_ATTN --tensor-type attn_out=$TYPE_ATTN --output-tensor-type $TYPE_OUTPUT $SRC_GGUF $DST_GGUF $TYPE_FFN $N_THREADS
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
---
|
| 38 |
+
|
| 39 |
+
## Commands used for Llama 3.2
|
| 40 |
+
|
| 41 |
+
---
|
| 42 |
+
|
| 43 |
+
### Llama 3.2 3B - Crush token embeddings to Q2_K, otherwise Q8_0
|
| 44 |
+
|
| 45 |
+
```bash
|
| 46 |
+
TYPE_EMBD=Q2_K
|
| 47 |
+
TYPE_FFN=Q8_0
|
| 48 |
+
TYPE_ATTN=Q8_0
|
| 49 |
+
TYPE_OUTPUT=Q8_0
|
| 50 |
+
SRC_GGUF=/opt/workspace/gguf/Llama-3.2-3B-BF16.gguf
|
| 51 |
+
DST_GGUF=/opt/workspace/gguf/Llama-3.2-3B-EQ2_K-FQ8_0-AQ8_0-OQ8_0.gguf
|
| 52 |
+
N_THREADS=16
|
| 53 |
+
|
| 54 |
+
./llama.cpp/build/bin/llama-quantize --token-embedding-type $TYPE_EMBD --tensor-type ffn_down=$TYPE_FFN --tensor-type ffn_gate=$TYPE_FFN --tensor-type ffn_up=$TYPE_FFN --tensor-type attn_k=$TYPE_ATTN --tensor-type attn_q=$TYPE_ATTN --tensor-type attn_v=$TYPE_ATTN --tensor-type attn_out=$TYPE_ATTN --output-tensor-type $TYPE_OUTPUT $SRC_GGUF $DST_GGUF $TYPE_FFN $N_THREADS
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
---
|
| 58 |
+
|
| 59 |
+
### Llama 3.2 3B - Crush FFN to Q2_K, otherwise Q8_0
|
| 60 |
+
|
| 61 |
+
```bash
|
| 62 |
+
TYPE_EMBD=Q8_0
|
| 63 |
+
TYPE_FFN=Q2_K
|
| 64 |
+
TYPE_ATTN=Q8_0
|
| 65 |
+
TYPE_OUTPUT=Q8_0
|
| 66 |
+
SRC_GGUF=/opt/workspace/gguf/Llama-3.2-3B-BF16.gguf
|
| 67 |
+
DST_GGUF=/opt/workspace/gguf/Llama-3.2-3B-EQ8_0-FQ2_K-AQ8_0-OQ8_0.gguf
|
| 68 |
+
N_THREADS=16
|
| 69 |
+
|
| 70 |
+
./llama.cpp/build/bin/llama-quantize --token-embedding-type $TYPE_EMBD --tensor-type ffn_down=$TYPE_FFN --tensor-type ffn_gate=$TYPE_FFN --tensor-type ffn_up=$TYPE_FFN --tensor-type attn_k=$TYPE_ATTN --tensor-type attn_q=$TYPE_ATTN --tensor-type attn_v=$TYPE_ATTN --tensor-type attn_out=$TYPE_ATTN --output-tensor-type $TYPE_OUTPUT $SRC_GGUF $DST_GGUF $TYPE_FFN $N_THREADS
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
---
|
| 74 |
+
|
| 75 |
+
### Llama 3.2 3B - Crush attention to Q2_K, otherwise Q8_0
|
| 76 |
+
|
| 77 |
+
```bash
|
| 78 |
+
TYPE_EMBD=Q8_0
|
| 79 |
+
TYPE_FFN=Q8_0
|
| 80 |
+
TYPE_ATTN=Q2_K
|
| 81 |
+
TYPE_OUTPUT=Q8_0
|
| 82 |
+
SRC_GGUF=/opt/workspace/gguf/Llama-3.2-3B-BF16.gguf
|
| 83 |
+
DST_GGUF=/opt/workspace/gguf/Llama-3.2-3B-EQ8_0-FQ8_0-AQ2_K-OQ8_0.gguf
|
| 84 |
+
N_THREADS=16
|
| 85 |
+
|
| 86 |
+
./llama.cpp/build/bin/llama-quantize --token-embedding-type $TYPE_EMBD --tensor-type ffn_down=$TYPE_FFN --tensor-type ffn_gate=$TYPE_FFN --tensor-type ffn_up=$TYPE_FFN --tensor-type attn_k=$TYPE_ATTN --tensor-type attn_q=$TYPE_ATTN --tensor-type attn_v=$TYPE_ATTN --tensor-type attn_out=$TYPE_ATTN --output-tensor-type $TYPE_OUTPUT $SRC_GGUF $DST_GGUF $TYPE_FFN $N_THREADS
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
---
|
| 90 |
+
|
| 91 |
+
### Llama 3.2 3B - Crush output tensor to Q2_K, otherwise Q8_0
|
| 92 |
+
|
| 93 |
+
> **This result was not included because Llama 3.2 3B has no output tensor! The resulting file is the same as a normal Q8_0.**
|
| 94 |
+
|
| 95 |
+
```bash
|
| 96 |
+
TYPE_EMBD=Q8_0
|
| 97 |
+
TYPE_FFN=Q8_0
|
| 98 |
+
TYPE_ATTN=Q8_0
|
| 99 |
+
TYPE_OUTPUT=Q2_K
|
| 100 |
+
SRC_GGUF=/opt/workspace/gguf/Llama-3.2-3B-BF16.gguf
|
| 101 |
+
DST_GGUF=/opt/workspace/gguf/Llama-3.2-3B-EQ8_0-FQ8_0-AQ8_0-OQ2_K.gguf
|
| 102 |
+
N_THREADS=16
|
| 103 |
+
|
| 104 |
+
./llama.cpp/build/bin/llama-quantize --token-embedding-type $TYPE_EMBD --tensor-type ffn_down=$TYPE_FFN --tensor-type ffn_gate=$TYPE_FFN --tensor-type ffn_up=$TYPE_FFN --tensor-type attn_k=$TYPE_ATTN --tensor-type attn_q=$TYPE_ATTN --tensor-type attn_v=$TYPE_ATTN --tensor-type attn_out=$TYPE_ATTN --output-tensor-type $TYPE_OUTPUT $SRC_GGUF $DST_GGUF $TYPE_FFN $N_THREADS
|
| 105 |
+
```
|
| 106 |
+
|
| 107 |
+
---
|
| 108 |
+
|
| 109 |
+
## Raw results for Llama 3.2 3B
|
| 110 |
+
|
| 111 |
+
```
|
| 112 |
+
Number of input texts: 10
|
| 113 |
+
Shortest input length in tokens: 55
|
| 114 |
+
Longest input length in tokens: 4678
|
| 115 |
+
Average input length in tokens: 1605.5
|
| 116 |
+
Total number of input tokens: 16055
|
| 117 |
+
--------------------------------------------------------------------------------
|
| 118 |
+
Evaluating baseline model Llama-3.2-3B-BF16.gguf...
|
| 119 |
+
Load model...
|
| 120 |
+
Evaluate prompts...
|
| 121 |
+
Unload model...
|
| 122 |
+
--------------------------------------------------------------------------------
|
| 123 |
+
Now processing: Llama-3.2-3B-Q2_K.gguf
|
| 124 |
+
Load model...
|
| 125 |
+
Evaluate prompts...
|
| 126 |
+
Unload model...
|
| 127 |
+
Compute MSD...
|
| 128 |
+
Mean-Squared Deviation - Llama-3.2-3B-BF16.gguf vs. Llama-3.2-3B-Q2_K.gguf:
|
| 129 |
+
-- Prompt 0: 1.2261667251586914
|
| 130 |
+
-- Prompt 1: 1.1347604990005493
|
| 131 |
+
-- Prompt 2: 1.388033390045166
|
| 132 |
+
-- Prompt 3: 1.1053369045257568
|
| 133 |
+
-- Prompt 4: 1.7510676383972168
|
| 134 |
+
-- Prompt 5: 4.586221218109131
|
| 135 |
+
-- Prompt 6: 1.3651360273361206
|
| 136 |
+
-- Prompt 7: 0.8970077037811279
|
| 137 |
+
-- Prompt 8: 0.3409916162490845
|
| 138 |
+
-- Prompt 9: 1.2506738901138306
|
| 139 |
+
Average MSD: 1.5045396089553833
|
| 140 |
+
--------------------------------------------------------------------------------
|
| 141 |
+
Now processing: Llama-3.2-3B-EQ2_K-FQ8_0-AQ8_0-OQ8_0.gguf
|
| 142 |
+
Load model...
|
| 143 |
+
Evaluate prompts...
|
| 144 |
+
Unload model...
|
| 145 |
+
Compute MSD...
|
| 146 |
+
Mean-Squared Deviation - Llama-3.2-3B-BF16.gguf vs. Llama-3.2-3B-EQ2_K-FQ8_0-AQ8_0-OQ8_0.gguf:
|
| 147 |
+
-- Prompt 0: 0.3589555025100708
|
| 148 |
+
-- Prompt 1: 0.1420530527830124
|
| 149 |
+
-- Prompt 2: 0.3871675133705139
|
| 150 |
+
-- Prompt 3: 0.38336610794067383
|
| 151 |
+
-- Prompt 4: 0.4630553722381592
|
| 152 |
+
-- Prompt 5: 0.3928600549697876
|
| 153 |
+
-- Prompt 6: 0.46294596791267395
|
| 154 |
+
-- Prompt 7: 0.41983363032341003
|
| 155 |
+
-- Prompt 8: 0.0822080597281456
|
| 156 |
+
-- Prompt 9: 0.3548887372016907
|
| 157 |
+
Average MSD: 0.34473341703414917
|
| 158 |
+
--------------------------------------------------------------------------------
|
| 159 |
+
Now processing: Llama-3.2-3B-EQ8_0-FQ2_K-AQ8_0-OQ8_0.gguf
|
| 160 |
+
Load model...
|
| 161 |
+
Evaluate prompts...
|
| 162 |
+
Unload model...
|
| 163 |
+
Compute MSD...
|
| 164 |
+
Mean-Squared Deviation - Llama-3.2-3B-BF16.gguf vs. Llama-3.2-3B-EQ8_0-FQ2_K-AQ8_0-OQ8_0.gguf:
|
| 165 |
+
-- Prompt 0: 4.409396648406982
|
| 166 |
+
-- Prompt 1: 2.431891679763794
|
| 167 |
+
-- Prompt 2: 5.892056941986084
|
| 168 |
+
-- Prompt 3: 4.688146591186523
|
| 169 |
+
-- Prompt 4: 6.351741313934326
|
| 170 |
+
-- Prompt 5: 8.826679229736328
|
| 171 |
+
-- Prompt 6: 4.506043434143066
|
| 172 |
+
-- Prompt 7: 4.613113880157471
|
| 173 |
+
-- Prompt 8: 1.0596126317977905
|
| 174 |
+
-- Prompt 9: 4.1558661460876465
|
| 175 |
+
Average MSD: 4.693454742431641
|
| 176 |
+
--------------------------------------------------------------------------------
|
| 177 |
+
Now processing: Llama-3.2-3B-EQ8_0-FQ8_0-AQ2_K-OQ8_0.gguf
|
| 178 |
+
Load model...
|
| 179 |
+
Evaluate prompts...
|
| 180 |
+
Unload model...
|
| 181 |
+
Compute MSD...
|
| 182 |
+
Mean-Squared Deviation - Llama-3.2-3B-BF16.gguf vs. Llama-3.2-3B-EQ8_0-FQ8_0-AQ2_K-OQ8_0.gguf:
|
| 183 |
+
-- Prompt 0: 1.0618470907211304
|
| 184 |
+
-- Prompt 1: 1.1212399005889893
|
| 185 |
+
-- Prompt 2: 1.3122810125350952
|
| 186 |
+
-- Prompt 3: 0.9195016026496887
|
| 187 |
+
-- Prompt 4: 1.201547622680664
|
| 188 |
+
-- Prompt 5: 5.760651111602783
|
| 189 |
+
-- Prompt 6: 1.0914928913116455
|
| 190 |
+
-- Prompt 7: 0.9646959900856018
|
| 191 |
+
-- Prompt 8: 0.41648873686790466
|
| 192 |
+
-- Prompt 9: 1.4317259788513184
|
| 193 |
+
Average MSD: 1.5281471014022827
|
| 194 |
+
--------------------------------------------------------------------------------
|
| 195 |
+
Now processing: Llama-3.2-3B-Q8_0.gguf
|
| 196 |
+
Load model...
|
| 197 |
+
Evaluate prompts...
|
| 198 |
+
Unload model...
|
| 199 |
+
Compute MSD...
|
| 200 |
+
Mean-Squared Deviation - Llama-3.2-3B-BF16.gguf vs. Llama-3.2-3B-Q8_0.gguf:
|
| 201 |
+
-- Prompt 0: 0.0023212190717458725
|
| 202 |
+
-- Prompt 1: 0.0014450754970312119
|
| 203 |
+
-- Prompt 2: 0.003914575092494488
|
| 204 |
+
-- Prompt 3: 0.002514646854251623
|
| 205 |
+
-- Prompt 4: 0.003313937224447727
|
| 206 |
+
-- Prompt 5: 0.004224818665534258
|
| 207 |
+
-- Prompt 6: 0.0026909655425697565
|
| 208 |
+
-- Prompt 7: 0.0033839084208011627
|
| 209 |
+
-- Prompt 8: 0.0015104531776160002
|
| 210 |
+
-- Prompt 9: 0.002354747150093317
|
| 211 |
+
Average MSD: 0.0027674345765262842
|
| 212 |
+
--------------------------------------------------------------------------------
|
| 213 |
+
Average Mean-Squared Deviation compared to Llama-3.2-3B-BF16.gguf:
|
| 214 |
+
--------------------------------------------------------------------------------
|
| 215 |
+
Llama-3.2-3B-Q2_K.gguf -- 1.5045396089553833
|
| 216 |
+
Llama-3.2-3B-EQ2_K-FQ8_0-AQ8_0-OQ8_0.gguf -- 0.34473341703414917
|
| 217 |
+
Llama-3.2-3B-EQ8_0-FQ2_K-AQ8_0-OQ8_0.gguf -- 4.693454742431641
|
| 218 |
+
Llama-3.2-3B-EQ8_0-FQ8_0-AQ2_K-OQ8_0.gguf -- 1.5281471014022827
|
| 219 |
+
Llama-3.2-3B-Q8_0.gguf -- 0.0027674345765262842
|
| 220 |
+
--------------------------------------------------------------------------------
|
| 221 |
+
```
|
| 222 |
+
|
| 223 |
+
---
|
| 224 |
+
|
| 225 |
+
## Summarized results for Llama 3.2 3B
|
| 226 |
+
|
| 227 |
+
Approximate Mean-Squared Deviation as compared to BF16, average over 10 inputs (lower is better):
|
| 228 |
+
- Standard Q8_0 quant: **0.002**
|
| 229 |
+
- Crush token embeddings to Q2_K, otherwise Q8_0: **0.344**
|
| 230 |
+
- Standard Q2_K quant: **1.504**
|
| 231 |
+
- Crush attention to Q2_K, otherwise Q8_0: **1.528**
|
| 232 |
+
- Crush FFN to Q2_K, otherwise Q8_0: **4.693**
|
| 233 |
+
|
| 234 |
+
---
|
| 235 |
+
|
| 236 |
+
## Commands used for Qwen2.5-14B
|
| 237 |
+
|
| 238 |
+
---
|
| 239 |
+
|
| 240 |
+
### Qwen2.5-14B - Crush token embeddings to Q2_K, otherwise Q8_0
|
| 241 |
+
|
| 242 |
+
```bash
|
| 243 |
+
TYPE_EMBD=Q2_K
|
| 244 |
+
TYPE_FFN=Q8_0
|
| 245 |
+
TYPE_ATTN=Q8_0
|
| 246 |
+
TYPE_OUTPUT=Q8_0
|
| 247 |
+
SRC_GGUF=/opt/workspace/gguf/Qwen2.5-14B-BF16.gguf
|
| 248 |
+
DST_GGUF=/opt/workspace/gguf/Qwen2.5-14B-EQ2_K-FQ8_0-AQ8_0-OQ8_0.gguf
|
| 249 |
+
N_THREADS=16
|
| 250 |
+
|
| 251 |
+
./llama.cpp/build/bin/llama-quantize --token-embedding-type $TYPE_EMBD --tensor-type ffn_down=$TYPE_FFN --tensor-type ffn_gate=$TYPE_FFN --tensor-type ffn_up=$TYPE_FFN --tensor-type attn_k=$TYPE_ATTN --tensor-type attn_q=$TYPE_ATTN --tensor-type attn_v=$TYPE_ATTN --tensor-type attn_out=$TYPE_ATTN --output-tensor-type $TYPE_OUTPUT $SRC_GGUF $DST_GGUF $TYPE_FFN $N_THREADS
|
| 252 |
+
```
|
| 253 |
+
|
| 254 |
+
---
|
| 255 |
+
|
| 256 |
+
### Qwen2.5-14B - Crush FFNs to Q2_K, otherwise Q8_0
|
| 257 |
+
|
| 258 |
+
```bash
|
| 259 |
+
TYPE_EMBD=Q8_0
|
| 260 |
+
TYPE_FFN=Q2_K
|
| 261 |
+
TYPE_ATTN=Q8_0
|
| 262 |
+
TYPE_OUTPUT=Q8_0
|
| 263 |
+
SRC_GGUF=/opt/workspace/gguf/Qwen2.5-14B-BF16.gguf
|
| 264 |
+
DST_GGUF=/opt/workspace/gguf/Qwen2.5-14B-EQ8_0-FQ2_K-AQ8_0-OQ8_0.gguf
|
| 265 |
+
N_THREADS=16
|
| 266 |
+
|
| 267 |
+
./llama.cpp/build/bin/llama-quantize --token-embedding-type $TYPE_EMBD --tensor-type ffn_down=$TYPE_FFN --tensor-type ffn_gate=$TYPE_FFN --tensor-type ffn_up=$TYPE_FFN --tensor-type attn_k=$TYPE_ATTN --tensor-type attn_q=$TYPE_ATTN --tensor-type attn_v=$TYPE_ATTN --tensor-type attn_out=$TYPE_ATTN --output-tensor-type $TYPE_OUTPUT $SRC_GGUF $DST_GGUF $TYPE_FFN $N_THREADS
|
| 268 |
+
```
|
| 269 |
+
|
| 270 |
+
---
|
| 271 |
+
|
| 272 |
+
### Qwen2.5-14B - Crush attention to Q2_K, otherwise Q8_0
|
| 273 |
+
|
| 274 |
+
```bash
|
| 275 |
+
TYPE_EMBD=Q8_0
|
| 276 |
+
TYPE_FFN=Q8_0
|
| 277 |
+
TYPE_ATTN=Q2_K
|
| 278 |
+
TYPE_OUTPUT=Q8_0
|
| 279 |
+
SRC_GGUF=/opt/workspace/gguf/Qwen2.5-14B-BF16.gguf
|
| 280 |
+
DST_GGUF=/opt/workspace/gguf/Qwen2.5-14B-EQ8_0-FQ8_0-AQ2_K-OQ8_0.gguf
|
| 281 |
+
N_THREADS=16
|
| 282 |
+
|
| 283 |
+
./llama.cpp/build/bin/llama-quantize --token-embedding-type $TYPE_EMBD --tensor-type ffn_down=$TYPE_FFN --tensor-type ffn_gate=$TYPE_FFN --tensor-type ffn_up=$TYPE_FFN --tensor-type attn_k=$TYPE_ATTN --tensor-type attn_q=$TYPE_ATTN --tensor-type attn_v=$TYPE_ATTN --tensor-type attn_out=$TYPE_ATTN --output-tensor-type $TYPE_OUTPUT $SRC_GGUF $DST_GGUF $TYPE_FFN $N_THREADS
|
| 284 |
+
```
|
| 285 |
+
|
| 286 |
+
---
|
| 287 |
+
|
| 288 |
+
### Qwen2.5-14B - Crush output tensor to Q2_K, otherwise Q8_0
|
| 289 |
+
|
| 290 |
+
```bash
|
| 291 |
+
TYPE_EMBD=Q8_0
|
| 292 |
+
TYPE_FFN=Q8_0
|
| 293 |
+
TYPE_ATTN=Q8_0
|
| 294 |
+
TYPE_OUTPUT=Q2_K
|
| 295 |
+
SRC_GGUF=/opt/workspace/gguf/Qwen2.5-14B-BF16.gguf
|
| 296 |
+
DST_GGUF=/opt/workspace/gguf/Qwen2.5-14B-EQ8_0-FQ8_0-AQ8_0-OQ2_K.gguf
|
| 297 |
+
N_THREADS=16
|
| 298 |
+
|
| 299 |
+
./llama.cpp/build/bin/llama-quantize --token-embedding-type $TYPE_EMBD --tensor-type ffn_down=$TYPE_FFN --tensor-type ffn_gate=$TYPE_FFN --tensor-type ffn_up=$TYPE_FFN --tensor-type attn_k=$TYPE_ATTN --tensor-type attn_q=$TYPE_ATTN --tensor-type attn_v=$TYPE_ATTN --tensor-type attn_out=$TYPE_ATTN --output-tensor-type $TYPE_OUTPUT $SRC_GGUF $DST_GGUF $TYPE_FFN $N_THREADS
|
| 300 |
+
```
|
| 301 |
+
|
| 302 |
+
---
|
| 303 |
+
|
| 304 |
+
## Raw results for Qwen2.5-14B
|
| 305 |
+
|
| 306 |
+
```
|
| 307 |
+
Number of input texts: 10
|
| 308 |
+
Shortest input length in tokens: 60
|
| 309 |
+
Longest input length in tokens: 4801
|
| 310 |
+
Average input length in tokens: 1589.3
|
| 311 |
+
Total number of input tokens: 15893
|
| 312 |
+
--------------------------------------------------------------------------------
|
| 313 |
+
Evaluating baseline model Qwen2.5-14B-BF16.gguf...
|
| 314 |
+
Load model...
|
| 315 |
+
Evaluate prompts...
|
| 316 |
+
Unload model...
|
| 317 |
+
--------------------------------------------------------------------------------
|
| 318 |
+
Now processing: Qwen2.5-14B-Q2_K.gguf
|
| 319 |
+
Load model...
|
| 320 |
+
Evaluate prompts...
|
| 321 |
+
Unload model...
|
| 322 |
+
Compute MSD...
|
| 323 |
+
Mean-Squared Deviation - Qwen2.5-14B-BF16.gguf vs. Qwen2.5-14B-Q2_K.gguf:
|
| 324 |
+
-- Prompt 0: 1.568434476852417
|
| 325 |
+
-- Prompt 1: 1.8605916500091553
|
| 326 |
+
-- Prompt 2: 1.2912431955337524
|
| 327 |
+
-- Prompt 3: 1.3367090225219727
|
| 328 |
+
-- Prompt 4: 1.1364308595657349
|
| 329 |
+
-- Prompt 5: 2.3384993076324463
|
| 330 |
+
-- Prompt 6: 1.2926896810531616
|
| 331 |
+
-- Prompt 7: 1.4084643125534058
|
| 332 |
+
-- Prompt 8: 0.32443684339523315
|
| 333 |
+
-- Prompt 9: 1.3756331205368042
|
| 334 |
+
Average MSD: 1.3933132886886597
|
| 335 |
+
--------------------------------------------------------------------------------
|
| 336 |
+
Now processing: Qwen2.5-14B-EQ2_K-FQ8_0-AQ8_0-OQ8_0.gguf
|
| 337 |
+
Load model...
|
| 338 |
+
Evaluate prompts...
|
| 339 |
+
Unload model...
|
| 340 |
+
Compute MSD...
|
| 341 |
+
Mean-Squared Deviation - Qwen2.5-14B-BF16.gguf vs. Qwen2.5-14B-EQ2_K-FQ8_0-AQ8_0-OQ8_0.gguf:
|
| 342 |
+
-- Prompt 0: 0.012962134554982185
|
| 343 |
+
-- Prompt 1: 0.019185630604624748
|
| 344 |
+
-- Prompt 2: 0.05430002510547638
|
| 345 |
+
-- Prompt 3: 0.008174948394298553
|
| 346 |
+
-- Prompt 4: 0.011592703871428967
|
| 347 |
+
-- Prompt 5: 0.012105505913496017
|
| 348 |
+
-- Prompt 6: 0.007557644974440336
|
| 349 |
+
-- Prompt 7: 0.01957087405025959
|
| 350 |
+
-- Prompt 8: 0.013395288027822971
|
| 351 |
+
-- Prompt 9: 0.007488884497433901
|
| 352 |
+
Average MSD: 0.01663336530327797
|
| 353 |
+
--------------------------------------------------------------------------------
|
| 354 |
+
Now processing: Qwen2.5-14B-EQ8_0-FQ2_K-AQ8_0-OQ8_0.gguf
|
| 355 |
+
Load model...
|
| 356 |
+
Evaluate prompts...
|
| 357 |
+
Unload model...
|
| 358 |
+
Compute MSD...
|
| 359 |
+
Mean-Squared Deviation - Qwen2.5-14B-BF16.gguf vs. Qwen2.5-14B-EQ8_0-FQ2_K-AQ8_0-OQ8_0.gguf:
|
| 360 |
+
-- Prompt 0: 2.483222246170044
|
| 361 |
+
-- Prompt 1: 2.20788836479187
|
| 362 |
+
-- Prompt 2: 2.2648935317993164
|
| 363 |
+
-- Prompt 3: 2.175588607788086
|
| 364 |
+
-- Prompt 4: 1.624481439590454
|
| 365 |
+
-- Prompt 5: 4.104475498199463
|
| 366 |
+
-- Prompt 6: 2.0161893367767334
|
| 367 |
+
-- Prompt 7: 2.0660784244537354
|
| 368 |
+
-- Prompt 8: 0.46407243609428406
|
| 369 |
+
-- Prompt 9: 2.1939690113067627
|
| 370 |
+
Average MSD: 2.160086154937744
|
| 371 |
+
--------------------------------------------------------------------------------
|
| 372 |
+
Now processing: Qwen2.5-14B-EQ8_0-FQ8_0-AQ2_K-OQ8_0.gguf
|
| 373 |
+
Load model...
|
| 374 |
+
Evaluate prompts...
|
| 375 |
+
Unload model...
|
| 376 |
+
Compute MSD...
|
| 377 |
+
Mean-Squared Deviation - Qwen2.5-14B-BF16.gguf vs. Qwen2.5-14B-EQ8_0-FQ8_0-AQ2_K-OQ8_0.gguf:
|
| 378 |
+
-- Prompt 0: 0.7283403277397156
|
| 379 |
+
-- Prompt 1: 1.0912593603134155
|
| 380 |
+
-- Prompt 2: 0.9022651314735413
|
| 381 |
+
-- Prompt 3: 0.4880850911140442
|
| 382 |
+
-- Prompt 4: 0.29713207483291626
|
| 383 |
+
-- Prompt 5: 0.6994995474815369
|
| 384 |
+
-- Prompt 6: 0.45846545696258545
|
| 385 |
+
-- Prompt 7: 0.5286242365837097
|
| 386 |
+
-- Prompt 8: 0.2947601079940796
|
| 387 |
+
-- Prompt 9: 0.5722559690475464
|
| 388 |
+
Average MSD: 0.6060687303543091
|
| 389 |
+
--------------------------------------------------------------------------------
|
| 390 |
+
Now processing: Qwen2.5-14B-EQ8_0-FQ8_0-AQ8_0-OQ2_K.gguf
|
| 391 |
+
Load model...
|
| 392 |
+
Evaluate prompts...
|
| 393 |
+
Unload model...
|
| 394 |
+
Compute MSD...
|
| 395 |
+
Mean-Squared Deviation - Qwen2.5-14B-BF16.gguf vs. Qwen2.5-14B-EQ8_0-FQ8_0-AQ8_0-OQ2_K.gguf:
|
| 396 |
+
-- Prompt 0: 1.2783535718917847
|
| 397 |
+
-- Prompt 1: 0.4481557607650757
|
| 398 |
+
-- Prompt 2: 1.1880418062210083
|
| 399 |
+
-- Prompt 3: 1.0997036695480347
|
| 400 |
+
-- Prompt 4: 0.8093082308769226
|
| 401 |
+
-- Prompt 5: 0.6486296057701111
|
| 402 |
+
-- Prompt 6: 1.1238276958465576
|
| 403 |
+
-- Prompt 7: 1.1459368467330933
|
| 404 |
+
-- Prompt 8: 0.23579858243465424
|
| 405 |
+
-- Prompt 9: 1.238993525505066
|
| 406 |
+
Average MSD: 0.9216748476028442
|
| 407 |
+
--------------------------------------------------------------------------------
|
| 408 |
+
Now processing: Qwen2.5-14B-Q8_0.gguf
|
| 409 |
+
Load model...
|
| 410 |
+
Evaluate prompts...
|
| 411 |
+
Unload model...
|
| 412 |
+
Compute MSD...
|
| 413 |
+
Mean-Squared Deviation - Qwen2.5-14B-BF16.gguf vs. Qwen2.5-14B-Q8_0.gguf:
|
| 414 |
+
-- Prompt 0: 0.0059487177059054375
|
| 415 |
+
-- Prompt 1: 0.004823403432965279
|
| 416 |
+
-- Prompt 2: 0.011750683188438416
|
| 417 |
+
-- Prompt 3: 0.004459250718355179
|
| 418 |
+
-- Prompt 4: 0.004037810489535332
|
| 419 |
+
-- Prompt 5: 0.0039064036682248116
|
| 420 |
+
-- Prompt 6: 0.004684466868638992
|
| 421 |
+
-- Prompt 7: 0.004520604852586985
|
| 422 |
+
-- Prompt 8: 0.004727284424006939
|
| 423 |
+
-- Prompt 9: 0.004541514907032251
|
| 424 |
+
Average MSD: 0.0053400141187012196
|
| 425 |
+
--------------------------------------------------------------------------------
|
| 426 |
+
Average Mean-Squared Deviation compared to Qwen2.5-14B-BF16.gguf:
|
| 427 |
+
--------------------------------------------------------------------------------
|
| 428 |
+
Qwen2.5-14B-Q2_K.gguf -- 1.3933132886886597
|
| 429 |
+
Qwen2.5-14B-EQ2_K-FQ8_0-AQ8_0-OQ8_0.gguf -- 0.01663336530327797
|
| 430 |
+
Qwen2.5-14B-EQ8_0-FQ2_K-AQ8_0-OQ8_0.gguf -- 2.160086154937744
|
| 431 |
+
Qwen2.5-14B-EQ8_0-FQ8_0-AQ2_K-OQ8_0.gguf -- 0.6060687303543091
|
| 432 |
+
Qwen2.5-14B-EQ8_0-FQ8_0-AQ8_0-OQ2_K.gguf -- 0.9216748476028442
|
| 433 |
+
Qwen2.5-14B-Q8_0.gguf -- 0.0053400141187012196
|
| 434 |
+
--------------------------------------------------------------------------------
|
| 435 |
+
```
|
| 436 |
+
|
| 437 |
+
---
|
| 438 |
+
|
| 439 |
+
## Summarized results for Qwen2.5-14B
|
| 440 |
+
|
| 441 |
+
Approximate Mean-Squared Deviation as compared to BF16, average over 10 inputs (lower is better):
|
| 442 |
+
- Standard Q8_0 quant: **0.005**
|
| 443 |
+
- Crush token embeddings to Q2_K, otherwise Q8_0: **0.016**
|
| 444 |
+
- Crush attention to Q2_K, otherwise Q8_0: **0.606**
|
| 445 |
+
- Crush output tensor to Q2_K, otherwise Q8_0: **0.921**
|
| 446 |
+
- Standard Q2_K quant: **1.393**
|
| 447 |
+
- Crush FFN to Q2_K, otherwise Q8_0: **2.160**
|
| 448 |
+
|
| 449 |
+
---
|