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. 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. 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.” 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. 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: “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.” 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. “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…” 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.” “Hey, so…? What do you want it to be?” shouted Langhorne from downstairs. I sighed. “Sorry, man,” I said. “No mistake. My fault. It’s alright, okay to go as is.” 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. # Albert Einstein ## Biography **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". 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. 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. 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. 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. 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. ## Scientific career 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. ### Special relativity 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. 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. 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. 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. ### General relativity #### General relativity and the equivalence principle 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. 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. 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. #### Gravitational waves 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. 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. #### Hole argument and Entwurf theory 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. 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. #### Physical cosmology 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. 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". 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. 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." 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. #### Energy momentum pseudotensor 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. 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. #### Wormholes 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. #### Einstein–Cartan theory 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. #### Equations of motion 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. ### Quantum mechanics #### Einstein's objections to quantum mechanics 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. #### Bohr versus Einstein 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. #### Einstein–Podolsky–Rosen paradox 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. 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. 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". 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. ### Unified field theory 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. ## In popular culture 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." 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*. ## Awards and honors 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. Einsteinium, a synthetic chemical element, was named in his honor in 1955, a few months after his death. # # Exceptions and other classes # class ExceededContextLengthException(Exception): """Exception raised when an input exceeds a model's context length""" class _LlamaStopwatch: """Track elapsed time for prompt processing and text generation""" # # Q: why don't you use llama_perf_context? # # A: comments in llama.h state to only use that in llama.cpp examples, # and to do your own performance measurements instead. # # trying to use llama_perf_context leads to output with # "0.00 ms per token" and "inf tokens per second" # def __init__(self): self.pp_start_time = None self.tg_start_time = None self.wall_start_time = None self.generic_start_time = None self.pp_elapsed_time = 0 self.tg_elapsed_time = 0 self.wall_elapsed_time = 0 self.generic_elapsed_time = 0 self.n_pp_tokens = 0 self.n_tg_tokens = 0 def start_pp(self): """Start prompt processing stopwatch""" self.pp_start_time = time.time_ns() def stop_pp(self): """Stop prompt processing stopwatch""" if self.pp_start_time is not None: self.pp_elapsed_time += time.time_ns() - self.pp_start_time self.pp_start_time = None def start_tg(self): """Start text generation stopwatch""" self.tg_start_time = time.time_ns() def stop_tg(self): """Stop text generation stopwatch""" if self.tg_start_time is not None: self.tg_elapsed_time += time.time_ns() - self.tg_start_time self.tg_start_time = None def start_wall_time(self): """Start wall-time stopwatch""" self.wall_start_time = time.time_ns() def stop_wall_time(self): """Stop wall-time stopwatch""" if self.wall_start_time is not None: self.wall_elapsed_time += time.time_ns() - self.wall_start_time self.wall_start_time = None def start_generic(self): """Start generic stopwatch (not shown in print_stats)""" self.generic_start_time = time.time_ns() def stop_generic(self): """Stop generic stopwatch""" if self.generic_start_time is not None: self.generic_elapsed_time += time.time_ns() - self.generic_start_time self.generic_start_time = None def get_elapsed_time_pp(self) -> int: """Total nanoseconds elapsed during prompt processing""" return self.pp_elapsed_time def get_elapsed_time_tg(self) -> int: """Total nanoseconds elapsed during text generation""" return self.tg_elapsed_time def get_elapsed_wall_time(self) -> int: """Total wall-time nanoseconds elapsed""" return self.wall_elapsed_time def get_elapsed_time_generic(self) -> int: """Total generic nanoseconds elapsed""" return self.generic_elapsed_time def increment_pp_tokens(self, n: int): if n < 0: raise ValueError('negative increments are not allowed') self.n_pp_tokens += n def increment_tg_tokens(self, n: int): if n < 0: raise ValueError('negative increments are not allowed') self.n_tg_tokens += n def reset(self): """Reset the stopwatch to its original state""" self.pp_start_time = None self.tg_start_time = None self.wall_start_time = None self.generic_start_time = None self.pp_elapsed_time = 0 self.tg_elapsed_time = 0 self.wall_elapsed_time = 0 self.generic_elapsed_time = 0 self.n_pp_tokens = 0 self.n_tg_tokens = 0 def print_stats(self): """Print performance statistics using current stopwatch state #### NOTE: The `n_tg_tokens` value will be equal to the number of calls to llama_decode which have a batch size of 1, which is technically not always equal to the number of tokens generated - it may be off by one.""" print(f"\n", end='', file=sys.stderr, flush=True) if self.n_pp_tokens + self.n_tg_tokens == 0: print_stopwatch(f'print_stats was called but no tokens were processed or generated') if self.n_pp_tokens > 0: pp_elapsed_ns = self.get_elapsed_time_pp() pp_elapsed_ms = pp_elapsed_ns / 1e6 pp_elapsed_s = pp_elapsed_ns / 1e9 pp_tps = self.n_pp_tokens / pp_elapsed_s print_stopwatch( f'prompt processing: {self.n_pp_tokens:>7} tokens in {pp_elapsed_ms:>13.3f}ms ' f'({pp_tps:>10.2f} tok/s)' ) if self.n_tg_tokens > 0: tg_elapsed_ns = self.get_elapsed_time_tg() tg_elapsed_ms = tg_elapsed_ns / 1e6 tg_elapsed_s = tg_elapsed_ns / 1e9 tg_tps = self.n_tg_tokens / tg_elapsed_s print_stopwatch( f' text generation: {self.n_tg_tokens:>7} tokens in {tg_elapsed_ms:>13.3f}ms ' f'({tg_tps:>10.2f} tok/s)' ) wall_elapsed_ns = self.get_elapsed_wall_time() wall_elapsed_ms = wall_elapsed_ns / 1e6 print_stopwatch(f" wall time:{' ' * 19}{wall_elapsed_ms:>13.3f}ms") 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 ) This year, our theme is Blind Date. All competitions entries will be shown without their creators' names, so get ready to admire the anonymous! We'll have intro competitions in different size categories, from 32 bytes to 1024 bytes. 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! We'll have size-coded related seminars to get you started, a Bytejam, Introshows, DJ Sets and other goodies. 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. This is the one event where size does matter! Don't miss it! https://lovebyte.party [Submitted by lovebyte] Правовая информация Онлайн-ресурс radiopotok.ru не осуществляет вещания, трансляцию и ретрансляцию радиостанций. Наш сайт предоставляет возможность прослушать онлайн радио, используя сторонние серверы, на которых уже установлено программное обеспечения для вещания. Сервис radiopotok.ru никак не связан с аудио-потоками, проходящими через плеер, установленный на сайте. Код плеера взят из открытых источников и воспроизводится исключительно на компьютере конечного пользователя посредством интернет-браузера. Сайт radiopotok.ru только предоставляет перечень онлайн потоков, доступных в открытых источниках. Однако, если, по Вашему мнению, воспроизведение какого-либо потока нарушает чьи-то права, свяжитесь с администрацией сайта. Мы всегда готовы разобрать любую ситуацию и подходим к каждому вопросу индивидуально. Если Вами обнаружено прямое нарушение авторского права, либо создалась конфликтная ситуация, свяжитесь с нашим представителем для решения вопроса по электронной почте radiopotok@bk.ru. Торговые марки, знаки и логотипы, прошедшие официальную регистрацию, принадлежат их владельцам. Любое использование на ресурсе radiopotok.ru таких объектов авторского права, включая названия организаций, которые являются их собственниками, преследует информационные цели. Все материалы на radiopotok.ru представлены только для ознакомления и не подлежат скачиванию и продаже. В случае обнаружения Вами фото-, видео-, аудио- и прочих материалов на ресурсе radiopotok.ru, авторскими правами на которые владеете Вы, и которые используются без согласия и ссылки на их обладателя, просим Вас написать нам по электронной почте radiopotok@bk.ru с официального почтового домена правообладателя. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 先生们,由于时间有限和环境不利,大多数人离开这个世界时并没有过多思考。那些尝试思考的人会头疼,然后转而做其他事情。我属于第二类人。随着我的职业生涯的发展,我在《名人录》中所占的篇幅越来越多,但无论是最后一期还是未来的任何一期,都不会解释我为何放弃新闻业。这将是我故事的主题,而无论如何,我本来也不会在其他情况下告诉你们。 我认识一个有才华的男孩,他决定建造一个灵敏的电流计,结果他做得太成功了;他的设备即使没有电流也会移动,对地球表面的震动作出反应。这可以作为我故事的座右铭。我是联合报业国际版夜班编辑。在那里,我忍受了很多,包括报纸排版的自动化。我告别了人类排字工人,转而使用IBM 0161,这是一台专门为排版工作设计的计算机。我后悔自己没有早出生一百五十年。我的故事会以“我引诱了德……伯爵夫人”开始,如果我开始描述我是如何从车夫手中抢过缰绳,鞭打马匹以逃离嫉妒丈夫派来的小混混,我就不必解释伯爵夫人是什么,或者引诱是如何进行的。但现在没那么简单。0161计算机并不是机械排字机。它是一个速度狂魔,通过工程技巧限制其速度,只是为了让我们跟上它的节奏。它可以替代十到十二个人。它直接连接到几十台电传打字机,以便我们通讯员在安卡拉、巴格达或东京打出的任何内容都能立即进入它的电路。计算机清理内容,并在屏幕上显示各种早报版面布局。午夜到凌晨三点之间——这是我们的截稿时间——它可以创建多达五十种不同的版本。轮到值班编辑决定哪个版本付印。如果要求一个人排版师做出五十个,甚至只是五个不同版本,他会疯掉。但计算机比我们任何人都快上百万倍——或者如果它被允许的话。我确实意识到,像这样的评论破坏了我故事的吸引力。如果我不再赞美伯爵夫人乳房的象牙色肌肤,而是开始谈论它们的化学成分,伯爵夫人的魅力还剩多少?对讲故事的人来说,这是艰难的时代;一切触手可及的东西都过时了,而一切令人震惊的东西都需要百科全书的几页和一本大学课本。然而,没有人想出解决办法。 然而,与IBM的合作令人着迷。每当有新的故事进来——这一切都发生在一间大圆房间里,充斥着电传打字机的咔嗒声——计算机立即将其融入页面布局,当然,这只是在屏幕上。这都是影子游戏,电子的游戏。有些人对失去工作的人感到悲伤。我没有。计算机没有野心,如果在凌晨三点前五分钟最后一条国内新闻缺失,它也不会生气;它不会被家庭烦恼困扰,不需要在月底前借钱,不会累,不会让你觉得它比你更懂一切,如果你要求它把刚才作为标题的内容直接踢到最后一页,用非衬线字体,它也不会生气。但它也是极其苛求的,这一点并不容易察觉。如果你说“不”,那就是一个明确、果断的“不”,是暴君的判决,因为计算机不能不服从!但既然它从不出错,早报中的任何错误都将是人的错误。IBM的创造者考虑到了一切,除了一个小小的细节:无论它们多么平衡、固定,电传打字机都会震动,就像快速打字机一样。由于这些震动,连接我们的电传打字机与计算机的电缆有松动的趋势,最终导致插头断开。这种情况很少发生,也许一个月一两次。这并不是什么大麻烦——你只需要站起来把插头插回去——所以没有人要求更好的插头。我们每个值班编辑都想过这个问题,但没有多少信心。也许现在的插头已经不同了。如果是这样,那么我想告诉你的启示将永远不会重演。 那是在平安夜。我的版面在凌晨三点前刚刚完成——我喜欢留有几分钟的余地,足够休息和点燃我的烟斗。我感到满意,因为轮转机等待的不是我,而是最新的新闻——那天晚上是关于伊朗的,该国当天早晨发生了地震。通讯社只报道了通讯员电报的一部分,因为第一次震动后紧接着又发生了强烈震动,摧毁了电缆连接。由于无线电也沉默了,我们认为广播站一定已经毁了。我们指望我们的通讯员斯坦·罗杰斯。他身材矮小,像个骑师,知道如何利用这一点;有时他能挤上已经挤满人的军用直升机,因为他体重不超过一个手提箱。屏幕上充满了头版的布局——只有一个空白的白矩形。与伊朗的连接仍然丢失。即使有些电传打字机仍在背景中咔嗒作响,我一听到伊朗电传打字机开始工作,立刻就认出来了。这是经验的问题。令我惊讶的是,白矩形仍然为空,尽管文字应该以与电传打字机打印相同的速度填充。但停顿只持续了一两秒钟。然后,整篇报道同时出现在屏幕上,这让我感到惊讶。我记住了它。标题已经在那里。下面报道说:“当地时间上午十点至十一点之间,舍拉巴德发生了两次七级和八级的地下震动。城市被摧毁。估计死亡人数为1000人,6000人流离失所。” 我听到了蜂鸣器;打印机提醒我时间已经是凌晨三点。既然这么简短的故事留下了一些空白,我用两句话稀释了一下,然后通过按键将整期报纸发送到印刷室,那里会直接送到铸排机,然后是轮转机。 我无事可做,于是站起来伸展筋骨。当我重新点燃烟斗时,我注意到地板上有一根电缆。它从一台电传打字机上断开了,那正是罗杰斯使用的安卡拉电传打字机。当我拿起电缆时,一个荒谬的想法闪过我的脑海:如果电传打字机发出声音时电缆已经断开怎么办?这显然是一个荒谬的想法,因为计算机怎么可能在没有连接的情况下写出故事?我慢慢地走到电传打字机前,撕下一张印有信息的纸,举到眼前。我立刻感觉到措辞不同,但像往常一样,这个时间我感到疲倦和散漫,不相信自己的记忆。我再次打开计算机,让它显示头版,并将两个版本进行比较。它们确实不同,尽管差别不大。电传打字机版本写道: “当地时间上午十点到十一点之间,舍拉巴德发生了两次余震,震级分别为七级和八级。城市完全被摧毁。死亡人数超过五百人,无家可归者六千人。” 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;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;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;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;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;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;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;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;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;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;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; GGML_ASSERT(hparams.n_embd_head_k % ggml_blck_size(type_k) == 0); GGML_ASSERT(hparams.n_embd_head_v % ggml_blck_size(type_v) == 0); if (!hparams.vocab_only) { // GPU backends for (auto * dev : model->devices) { ggml_backend_t backend = ggml_backend_dev_init(dev, nullptr); if (backend == nullptr) { LLAMA_LOG_ERROR("%s: failed to initialize %s backend\n", __func__, ggml_backend_dev_name(dev)); llama_free(ctx); return nullptr; } ctx->backends.emplace_back(backend); } // add ACCEL backends (such as BLAS) for (size_t i = 0; i < ggml_backend_dev_count(); ++i) { ggml_backend_dev_t dev = ggml_backend_dev_get(i); if (ggml_backend_dev_type(dev) == GGML_BACKEND_DEVICE_TYPE_ACCEL) { ggml_backend_t backend = ggml_backend_dev_init(dev, nullptr); if (backend == nullptr) { LLAMA_LOG_ERROR("%s: failed to initialize %s backend\n", __func__, ggml_backend_dev_name(dev)); llama_free(ctx); return nullptr; } ctx->backends.emplace_back(backend); } } // add CPU backend ctx->backend_cpu = ggml_backend_init_by_type(GGML_BACKEND_DEVICE_TYPE_CPU, nullptr); if (ctx->backend_cpu == nullptr) { LLAMA_LOG_ERROR("%s: failed to initialize CPU backend\n", __func__); llama_free(ctx); return nullptr; } ctx->backends.emplace_back(ctx->backend_cpu); // create a list of the set_n_threads functions in the backends for (auto & backend : ctx->backends) { ggml_backend_dev_t dev = ggml_backend_get_device(backend.get()); ggml_backend_reg_t reg = dev ? ggml_backend_dev_backend_reg(dev) : nullptr; if (reg) { 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"); if (ggml_backend_set_n_threads_fn) { ctx->set_n_threads_fns.emplace_back(backend.get(), ggml_backend_set_n_threads_fn); } } } llama_set_abort_callback(ctx, params.abort_callback, params.abort_callback_data); if (!llama_kv_cache_init(ctx->kv_self, ctx->model, ctx->cparams, type_k, type_v, kv_size, cparams.offload_kqv)) { LLAMA_LOG_ERROR("%s: llama_kv_cache_init() failed for self-attention cache\n", __func__); llama_free(ctx); return nullptr; } { size_t memory_size_k = 0; size_t memory_size_v = 0; for (auto & k : ctx->kv_self.k_l) { memory_size_k += ggml_nbytes(k); } for (auto & v : ctx->kv_self.v_l) { memory_size_v += ggml_nbytes(v); } LLAMA_LOG_INFO("%s: KV self size = %7.2f MiB, K (%s): %7.2f MiB, V (%s): %7.2f MiB\n", __func__, (float)(memory_size_k + memory_size_v) / (1024.0f * 1024.0f), ggml_type_name(type_k), (float)memory_size_k / (1024.0f * 1024.0f), ggml_type_name(type_v), (float)memory_size_v / (1024.0f * 1024.0f)); } // graph outputs buffer { // resized during inference when a batch uses more outputs if (llama_output_reserve(*ctx, params.n_seq_max) < params.n_seq_max) { LLAMA_LOG_ERROR("%s: failed to reserve initial output buffer\n", __func__); llama_free(ctx); return nullptr; } LLAMA_LOG_INFO("%s: %10s output buffer size = %8.2f MiB\n", __func__, ggml_backend_buffer_name(ctx->buf_output.get()), ggml_backend_buffer_get_size(ctx->buf_output.get()) / 1024.0 / 1024.0); } // scheduler and compute buffers { // buffer types used for the compute buffer of each backend std::vector backend_buft; std::vector backend_ptrs; for (auto & backend : ctx->backends) { auto * buft = ggml_backend_get_default_buffer_type(backend.get()); auto backend_type = ggml_backend_dev_type(ggml_backend_get_device(backend.get())); if (backend_type == GGML_BACKEND_DEVICE_TYPE_CPU && !model->devices.empty()) { // use the host buffer of the first device CPU for faster transfer of the intermediate state auto * dev = model->devices[0]; auto * host_buft = ggml_backend_dev_host_buffer_type(dev); if (host_buft) { buft = host_buft; } } backend_buft.push_back(buft); backend_ptrs.push_back(backend.get()); } const size_t max_nodes = model->max_nodes(); // buffer used to store the computation graph and the tensor meta data ctx->buf_compute_meta.resize(ggml_tensor_overhead()*max_nodes + ggml_graph_overhead_custom(max_nodes, false)); // TODO: move these checks to ggml_backend_sched // enabling pipeline parallelism in the scheduler increases memory usage, so it is only done when necessary bool pipeline_parallel = model->n_devices() > 1 && model->params.n_gpu_layers > (int)model->hparams.n_layer && model->params.split_mode == LLAMA_SPLIT_MODE_LAYER && params.offload_kqv; // pipeline parallelism requires support for async compute and events in all devices if (pipeline_parallel) { for (auto & backend : ctx->backends) { auto dev_type = ggml_backend_dev_type(ggml_backend_get_device(backend.get())); if (dev_type == GGML_BACKEND_DEVICE_TYPE_CPU) { // ignore CPU backend continue; } auto * dev = ggml_backend_get_device(backend.get()); ggml_backend_dev_props props; ggml_backend_dev_get_props(dev, &props); if (!props.caps.async || !props.caps.events) { // device does not support async compute or events pipeline_parallel = false; break; } } } ctx->sched.reset(ggml_backend_sched_new(backend_ptrs.data(), backend_buft.data(), backend_ptrs.size(), max_nodes, pipeline_parallel)); if (pipeline_parallel) { LLAMA_LOG_INFO("%s: pipeline parallelism enabled (n_copies=%d)\n", __func__, ggml_backend_sched_get_n_copies(ctx->sched.get())); } // initialize scheduler with the worst-case graph uint32_t n_seqs = 1; // TODO: worst-case number of sequences uint32_t n_tokens = std::min(cparams.n_ctx, cparams.n_ubatch); 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 llama_ubatch ubatch_pp = { true, n_tokens, n_tokens / n_seqs, n_seqs, &token, nullptr, nullptr, nullptr, nullptr, nullptr}; ggml_cgraph * gf_pp = llama_build_graph(*ctx, ubatch_pp, true); // reserve pp graph first so that buffers are only allocated once ggml_backend_sched_reserve(ctx->sched.get(), gf_pp); int n_splits_pp = ggml_backend_sched_get_n_splits(ctx->sched.get()); int n_nodes_pp = ggml_graph_n_nodes(gf_pp); // reserve with tg graph to get the number of splits and nodes llama_ubatch ubatch_tg = { true, 1, 1, n_seqs, &token, nullptr, nullptr, nullptr, nullptr, nullptr}; ggml_cgraph * gf_tg = llama_build_graph(*ctx, ubatch_tg, true); ggml_backend_sched_reserve(ctx->sched.get(), gf_tg); int n_splits_tg = ggml_backend_sched_get_n_splits(ctx->sched.get()); int n_nodes_tg = ggml_graph_n_nodes(gf_tg); // reserve again with pp graph to avoid ggml-alloc reallocations during inference gf_pp = llama_build_graph(*ctx, ubatch_pp, true); if (!ggml_backend_sched_reserve(ctx->sched.get(), gf_pp)) { LLAMA_LOG_ERROR("%s: failed to allocate compute buffers\n", __func__); llama_free(ctx); return nullptr; } for (size_t i = 0; i < backend_ptrs.size(); ++i) { ggml_backend_t backend = backend_ptrs[i]; ggml_backend_buffer_type_t buft = backend_buft[i]; size_t size = ggml_backend_sched_get_buffer_size(ctx->sched.get(), backend); if (size > 1) { LLAMA_LOG_INFO("%s: %10s compute buffer size = %8.2f MiB\n", __func__, ggml_backend_buft_name(buft), size / 1024.0 / 1024.0); } } if (n_nodes_pp == n_nodes_tg) { LLAMA_LOG_INFO("%s: graph nodes = %d\n", __func__, n_nodes_pp); } else { LLAMA_LOG_INFO("%s: graph nodes = %d (with bs=%d), %d (with bs=1)\n", __func__, n_nodes_pp, n_tokens, n_nodes_tg); } if (n_splits_pp == n_splits_tg) { LLAMA_LOG_INFO("%s: graph splits = %d\n", __func__, n_splits_pp); } else { LLAMA_LOG_INFO("%s: graph splits = %d (with bs=%d), %d (with bs=1)\n", __func__, n_splits_pp, n_tokens, n_splits_tg); } } } Every Asshole Does Good Before Exiting Jake Rhodes 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. 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. 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.” 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. 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. 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. 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. 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. 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. 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.” 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. It is amazing how quickly technology changes our lives and how fast we find ourselves dependent upon that technology. A friend of mine has provided a case in point since a bolt of lightning blew out her computer a few weeks ago. To get it repaired, she has to take it back to the store where it was purchased, but of course they could not fix it there. They had to ship it off to the manufacturer. The computer store apparently gets deliveries of repaired computers (or at least of her brand of computer) of Tuesdays and Thursdays only. So on Tuesday and Thursday since it became reasonable for her computer to be returned, she has experienced the ups and downs of hope (that the store will call to say it is ready for pickup) and disappointment (when the call does not come). My friend is quite the Internet communicator, and now she has been cut off — cold turkey. The resulting stress is easy to see. She is part of a mail-group comprised of many people who share a particular interest in the entertainment field. Basically, this group is a fan club but thanks to the Internet they have become so much more than that to each other. Like any other large group they have a varied level of interest. Some just drop in occasionally while some are deeply involved. My friend fits into the latter category. The people in this group keep email flying across the country and even over-seas. They communicate about events and get-togethers. A few of them get together about every weekend and, several times a year, the larger events pull together all of them who can possibly get away. The Internet has brough together this large and varied group of people who otherwise might have sat in the same music hall for a concert or two, but probably have just gone their own way after the shows without exchanging a word. Thanks to the Internet, they've become like a huge family. They are old, they are young. Some are single, some are married. Some are professional types, some are blue-collar workers and some make a living in the arts. They send a receive their emails from homes and offices, some from tropical beaches and some from the cabins of their boats while they sail while they sail through foreign seas. They chat constantly. They send each other jokes and recipes. They make plans together, discuss everything from world events to group members' love lives, and the often look to each other for advice on anything from making major purchases to legal situations. My friend is used to coming home from work and finding 25 to 50 emails from members of the group waiting for her perusal. She sends recipes, some just one-to-one and others sent (via the miracle of email) to all members of the group at the same time. If she wakes during the wee hours of the night she can check her email and invariably find that some member of the group is up and communicating. To communicate at an equivalent level using a telephone would take hours of time and lots of dollars. It it like a lifeline into a bigger, more interesting world and now she is dependent on the occasional use of other people's computers to check in. Loss of that easy computer communication has left a big hole in her days, and she is definitely feeling it. She gets home from work and, our of habit, walks to the computer desk to check her email, only to realize that she cannot. She gets up during the night or in the mornings, stumbles to the desk to check her email and puts her fingers where the keyboard should be before she wakes up enough to remember that it is not there. She is not cut off from the group. Many of them have her telephone number and haven't forgotten how to use it. The continue to check in that way. But it just isn't the same. Hopefully, her computer will be repaired soon, and she can get back in the groove. I haven't yet gotten to that level of computer communication. I am making advances. Right now I have a few friends that I keep in contact with via email. I send my columns to The Baytown Sun that way and the paper is going to start printing my email address so readers can commmunicate with me that way if they would like to do so. I am afraid it will bring me more complaints and criticism than anything else, but we'll see how it goes. A trip away from this over-populated, over-trafficked metropolitan area we call home can teach us a few things and remind us of a few things we've forgotten. I learned a few on a jaunt through the country on the far side of San Antonio. First, if you are counting on Hill Country peaches, don't count too hard. According to folks from around Fredericksburg and Johnson City, the mild winter took a tool on the peach crop. The trees that produce the early batches just didn't get enough cold weather to do their thing as they usually do. Many of the pick-your-own places are closed down tight at a time of year when they usually do a booming business. There are some peaces available at roadside stands and shops, but not anywhere close to the usual number, either of peaches or of stands. Leaving peach country for points further west, I learned more things. One is that West Texas cops do not like Bandido T-shirts. I have such a shirt, something I picked up while doing an interview with a Bandido motorcycle racing group. It promotes a healthy activity by members of a group with a historically unhealthy reputation. I wore it into a cafe in a tiny West Texas town where several officers and deputies from various law enforcement agencies were gathered for breakast. The quick change from joking and laughter to dead silence and hard stares was startling. Soon, though, they apparently decided that I didn't look much like a hardened-criminal-outlaw-biker-come-to-tear-up-the-town type and settled down. I learned on this trip that old campers never die, they just end up lying around some deer lease in West Texas. In the off season, the circles of campers seem like some suddenly-abandoned gypsy caravan, home to many wasps, a few scorpions, and visited by only the many goats and few cattle that ranchers keep on land out there. Deer hunters pick up these campers cheap, drag them from their home towns to far-away places and prop them up on blocks or rocks. Some power them up and rig them for heat and air conditioning, flush toilets, running water and all the comforts of a home. Others are pretty dilapidated, and the comfort level is bare bones, as they are counted on only for shelter from rain and wind and as a place to lock up supplies. We were visiting (for maintenance purposes) a lease on a huge spread a hundred miles or so past San Antonio. There's about 1,200 acres of this place leased and deer stands scattered throughout. They range from some of the store-boughts to thrown-up creations of plywood ato a port-o-potty (cut a couple windows in those and they work just fine, and they even come with a built-in seat). The kind of country around there works well to remind us that we are awfully small, insignificant little things tosses here and there in this great big world. Lightning is also different there. Here we have scrawny little jagged bolts of lightning. Certainly it can be dangerous, but it is rarely awe-inspiring. Out there, the lightning is of an entirely different nature. Many of the lightning bolts are thicker, more like a huge is-this-the-end-of-the-world column of light. And the lightning doesn't just come down the the jaggedy way we see here. It can come down straight as an arrow, then bounce back up. It can curl aroud in circles and end with a spattering of lights like Fourth of July fireworks. It does all sorts of things that we don't see it do here. At night, a clear sky there shows us the stars from horizon to horizon — all the way down to the dirt. If all a person ever sees is the stars visible in the Houston area, then he has never really seen stars. I don't know whether the stars are truly different there, or the lack of pollution and man-made lights just allows us to see them more clearly. That's what such a trip can give — the ability to see some things more clearly. I'd trade in my cable television, my shopping malls and my fake fingernails for Mother Nature's light shows and the peace and quiet (and access to great peaches on the way) any day. At least for a little while. PRISTINA, Yugoslavia (AP) — Yugoslav troops rumbled out of Kosovo in trucks, armored cars and buses Thursday, prompting NATO to suspend its punishing 78-day ait war and the United Nations to authorize a heavily armed security force to restore peace and begin reconstruction. It appeared, however, that plans for moving NATO troops into Kosovo from Macedonia on Friday had been delayed. Sources, speaking on condition of anonymity, said the NATO operation had been pushed back, possibly as much as 24 hours. "We shall be off quite soon," British Lt. Gen. Michael Jackson, commander of NATO forces in Macedonia, said Thursday night. British paratoopers, the spearhead of an international force that will eventually number about 50,000, camped along the border, ready to move at first light. As dawn broke, however, the troops were still there and showed no sign of preparing to move out. Without citing a souce, a British newspaper, The Daily Telegraph, reported the operation was delayed because some contributing nations, including the Uniter States, said they were not ready. Jackson also warned the rebel Kosovo Liberation Army not to try to take advantage of the withdrawal to pursue its fight with Serb forces. He said U.N. Secretary-General Kofi Annan and other senior political leaders made it "quite clear that it would be foolish in the extreme to interfere with or create incidents" connected to the pull-out. "I would endorse that and say it would indeed be very stupid," Jackson said. Despite the death and destruction wreaked by the bombing campaign and the imminent arrival of a huge foreign force on Yugoslav soil, President Slobodan Milosevic proclaimed victory. "The people are the heroes," he said on national television at the same time that NATO Secretary-General Javier Solana announced the bombing campaign had been suspended. In Washington, President Clinton declared victory and praised NATO's unity, warning Milosevic that airstrikes would resume if he reneges on a peace deal to allow more than 860,000 ethnic Albanian refugees to return to Kosovo — most of them fled to Macedonia and Albania. "Tonight, fo the first time in 79 days, the skies over Yugoslavia are slient," Clinton said in an Oval Office address. He also said the United States would provice no reconstruction aid for Yugoslavia as long as Milosevic was in power. The trool pullout began hours after NATO and Yugoslav generals signed an agreement, a follow-up to the peace plan that Milosevic accepted last week after Russia and the West presented it as essentially nonnegotiable. All of the estimated 40,000 soldiers and special police are supposed to clear out of the southern Serb province within 11 days. About 150 trucks, other army vehicles and cars piled high with luggage and boxes carried soldies across Kosovo's nothern border Thursday afternoon at Merdare. The convoy included armored vehicles and mobile anti-aircraft weapons. Some of those in the convoy displayed souvenirs apparently taken from Albanian homes. 'Ann Jillian Story' tells of actress's cancer fight By JERRY BUCK AP Television Writer LOS ANGELES (AP) — Ann Jillian, who plays herself in a new NBC movie about her battle with cancer, says it was hard to find a producer who would tell it like it was. "The Ann Jillian Story," which will be televised Monday, tells of her courtship by a Chicago police seargent named Andy Murcia, their love and marriage and the cancer that forced the removal of both her breasts. The cancer couldn't keep her down. Eleven days after her double mastectomy, she was back on a movie sound stage finish a musical version of "Alice in Wonderland." "For a time I thought we would never get the movie made," says Jillian. "I'm happy to say it's done and it's very close to the way we wanted it done. We kept our integrity." She and her husband, who recently gave up his duties as her manager, went through three producers and numerous rewrites of the script before finding a production team willing to tell the story as it really happened. They had to constantly fight attempts by the producers to inject conflict between Jillian and her husband into the story. She refused to have her husband painted as a bad guy who turned away from his wife at a time when she needed him the most. "The truth is he was with me every step of the way, loving me, supporting me and helping me get through the crisis," she says. Tony Lo Bianco plays Murcia and Viveca Lindfors portrays Jillian's mother. (Jillian's parents, Joseph and Margaret Nauseda, fled from Lithuania and at one point barely escaped Soviet machine gun fire.) Corey Allen directed from a screenplay by Audrey Davis Levin, and the two producers whos view of the story matched Jillian's were Andrea Baynes and Peter Thompson. The movie was filmed in Toronto, which stood in for Chicago, New York and California. Once, they shed their parkas and did a beach scene. "We had a great time," Jillian says. "How often do you get to go back over your life and the good times and the joy? People aren't going to tune in and get bummed out for two hours. Our purpose is to restore hope and to entertain, then to inform and inspire. "This isn't an 'illness of the month' film," she says. "You'll never see four musical productions in an 'illness of the month' film. I sing 'Until the Real Thing Comes Along,' one of the songs I sang in Chicago when I met Andy." Jillian, knowing she would have to play herself 10 years younger, went through a rigorous training program. The chemotherapy following her surgery in 1985 had caused her to gain weight. Murcia took over as cook and saw that she got well-balanced meals that would take off the pounds. A choreographer dancer from her night club act put her through the paces three hours a day, five days a week. Marlboro tops list of $39 million in cigarettes illegally smoked by youths Though it is against the law for anyone under 18 to buy, posess or use tobacco products, Texas youths annually smoke more than 15 million packs of cigarettes worth $39 million, according to survey results released Thursday by the Texas Department of Health. TDH's Texas Youth Tobacco Survey also revealed that Marlboro is by far the most popular brand of cigarettes among underage smokers. Some 70 percent of the smokers in grades six through 12 smoke Marlboro. Newport, at 9 percent, is the second-most populat brand followed by Camel at 7 percent. Texas Commissioner of Health William Archer, M.D., said it is no coincidence that Marlboro leads the list. "Marlboro is the most heavily advertised brand. That advertising is obviously working on our youth. Parents and kids need to be more concerned about the health hazards of smoking and furious over the amount of money tobacco companies are making off our children." Other survey findings released Thursday include: - Of the 15.5 million packs of cigarettes smoked by Texas kids each year, 10.9 million are Marlboros, 1.5 million are Newports and 1.4 million are Camels. - The $39 million total price tag includes $27.6 million for Marlboros; $3.7 million for Newports and $3.5 million for Camels. - Marlboro is the brand of choice amond white (73 percent) and Hispanic (74 percent) students. Newport is the leading brand among blacks (48 percent). - Some 31 percent of the smokers in grades 6 through 12 are frequent cigarette smokers, and 69 percent are occasional smokers. - While 40 percent of the white students who smoke are frequent smokers, only 21 percent of the Hispanic and 12 percent of the black students who smoke are frequent smokers. Smokers were classified as "frequent" if they had smoked on at least 20 of the previous 30 days and "occasional" if they had smoked on from one to 19 of the previous 30 days. The survey, a representative sampling of middle and high school students in Texas public schools, was conducted last spring. Archer said the survey was conducted to get a thorough reading on underage tobabbo use and to establish a baseline for evaluating the effectiveness of future anti-tobacco use programs. Earlier results revealed that 31 percent of Texas' 894,000 middle school students and 43 percent of the 1,059,000 high school students use some form of tobacco. Future reports will assess how and where kids get tobacco, why they use it and their knowledge of Texas tobacco laws. Club news Tri-City Grandmothers Club Tri-City Grandmothers Club No. 902 will meet for a regular business meeting at 1 p.m. Jan. 5 in the Mockingbird room of the Community Building, 2407 Market. A covered disk luncheon followed by a fellowship hour will be held a noon Jan. 19. On Jan. 27, the annual games party will be held at Wyatt's Cafeteria beginning at 10 a.m. This event helps make possible contributions to national and local projects slanted toward needs of children. Other Grandmothers clubs in the area will participate in the games party. Birthdays for January include Pauline Baldwin, Martha Elliott, Opal Franke, Inez Korner and Johnie Ralmuto. Hostesses for January are Elvie McCullough, Sadie Platt and Agnes Singletary. Christmas baskets for two families were provided by the club. Special guests at the club's Christmas luncheon and gift exchange were Cindy Fauver, coordinator for Jam Fonteno's senior citizen program; and Gertrude Folder of Minnesota, mother-in-law of Lynne Foley, new Lee College coordinator of the Continuing Education Program. On Dec. 19, several members attended the musical "Sound of Music" performed at the Music Hall in Houston. A shopping spree anf lunch out at a chosen mall was held Dec. 29. Pilot Club of Baytown The Pilot Club of Baytown will meet at noon Jan. 12 at the Goose Creek Country Club for a luncheon business and program meeting. President Maryon Babin will conduct the meeting. Gera Mickel and Jan Harris, presidents of the Robert E. Lee and Ross S. Sterling high school Anchor Clubs, respectively, will give highlights of their trip to a leadership conference at Freedoms Foundation in Valley Forge, Pa. Billie Brinkley and Jane Goodner, REL and RSS Anchor Club sponsors, respectively, will be guests at the meeting. Reports on programs of activities will be given by the area leaders in the internal affairs, outreach and projects divisions under the direction of President-elect Chic Godwin. Plans will be announced for the official visit on Jan. 19 by Joyce Beene of Longview, president-elect of the Texas District, Pilot International. At the Christmas meeting and party held at the Goose Creek Country Club, a buffet dinner was served to members and their spouses. For the entertainment, a group from the Baytown Community Chorus under the direction of Don Ball sand a medley of Christmas carols accompanied by Richard Ponder. Afterwards, members and guests exchanged Christmas gifts. Posted in[Opinion](https://thebarbedwire.com/category/opinion/) # I Can’t Believe It’s Not Heroin! I can tell you from experience that withdrawals from 7-OH are terrible and very difficult to manage. We should stop selling synthetic opiates at the gas station. ![Avatar photo](https://thebarbedwire.com/wp-content/uploads/2024/12/cropped-CFDC02B3-9724-400F-8C8C-56995C8BD22E-80x80.jpg) by [Jake Rhodes](https://thebarbedwire.com/author/jake-rhodes/) January 17, 2025Updated January 23, 2025 ![a needle and a spoon and a bunch of pills](https://thebarbedwire.com/wp-content/uploads/2025/01/241227_syntheticdrugs2-1200x900.jpg?crop=1) Credit: Photo Illustration by The Barbed Wire/Photos Getty, Adobe Stock _(Editor’s Note: If you or a loved one struggle with substance abuse disorder, visit_ [_findtreatment.gov_](https://findtreatment.gov/) _to learn about options for treatment and help. And don’t try any of this at home.)_ When I was 29, there was a vape shop by my apartment where I bought nicotine pouches.  They sat on the shelf to the left of a selection of kratom products: various powders, capsules, and tinctures of a Southeast Asian plant that, in low doses, have stimulant-like effects and, in high doses, mild opiate-like effects. I’d used kratom powder to get off of vicodin and morphine — habits I picked up at 20 years old after moving into a rat-infested drug den with some friends.  But at 29, I wasn’t really thinking about opiates. I hadn’t popped a pain pill or snorted morphine in six years, and I had no real intention of doing so on this particularly cool winter day. But then, I went to pay for the one drug I allowed myself to consume on a day-to-day basis: mint flavored paper pouches of nicotine, which keep me from yelling at everyone and doing the dishes too aggressively. That’s when I noticed a little white, almost medicinal-looking box that said “Hydroxie.” I sort of laughed and said, “The fuck is that?” to the baby-faced stoner kid working the touch-screen register.  “Oh, it’s 7-OH. It’s the stuff in kratom thats fucks you up but like, _super_ concentrated. It’s like dabs but for kratom kinda,” he replied. “Shit flies off the shelves here, man. People love it.”  “This shit’s legal? It works?” I asked, as I craned my neck to get a look at the price tag. I had butterflies in my stomach. The kind right when you crest the peak of a roller coaster, when you know what’s coming, and you’re probably going to be mostly safe. But you’re excited and scared nonetheless. That mix of energy and adrenaline and excitement.  $20 for two 20 milligram pills. I used to pawn every guitar I had for that kind of dose.  “Yea, dude. Shit’s no joke at all,” he answered.  Things in my life were going about as well as they could go, given the circumstances at the time.  “What the hell,” I said. “Throw ’em in the bag.”  The kid rang me up, but before I left, he warned, “Hey man, maybe just eat half and see how you feel. I see a lot of people roll through here for ’em. Construction guys usually. They buy me out the day I restock. Just be careful, man! Have a good one, bro.”  *** Back at my apartment, I popped the box open to find a foil-back pack with two pills, as promised. The look and feel was in every way similar to a two-pack of travel Tylenol. The pills were light brown, sort of chalky, with a large “H” stamped in the middle to resemble street-pressed pain pills and fake Oxy. I laughed a little at the not-so-subtle branding of the product and broke the pill in half; it gave way without much effort. I hesitated a bit, and a montage of bad memories played out in fast-forward in my head. Pawn shops, arguments with family, the empty half-hearted smile of the intake nurse at a mental hospital in South Austin, blood in the sink, and red in the bank account. All that went away pretty quickly, though, when I thought about how good my life had been lately. I deserved a little something for 150 days free from alcohol. That had been the last dragon left to slay after 15 years of asking, “Gee, what does this stuff do if I take a bunch of it?”  I popped the chalky tablet in my mouth, washed it back with a tamarind Jarritos soda, and got to work. *** It starts in your legs and in the back of your chest. There’s a levity, like tilting a chair onto its hind legs and finding that sweet spot right before it falls over.  Then there’s the warmth. It’s not just the sensation of physical temperature. It’s like coming back to your apartment after a night out in the winter. The warmth of home. It’s familiar, it’s kind, and it doesn’t want to harm you.  At least at first.  Then, there’s what’s colloquially referred to as “the nod.” It’s a trance brought on by the aforementioned sensations as the endorphins start kicking in. Suddenly you’re oscillating between the alertness of a fever dream and the lethargy of that first “plop” down on the couch after a long shift. It’s both heavy and light. Like a lilt in a child’s lullaby, or the raspy vibrato of a lounge singer as she ascends and descends with the scales of the piano.  It is fucking incredible, and there is nothing like it.  I spent the next two hours drifting in and out of consciousness on my couch. Before I passed out, the last thing I remember thinking was, “There is no fucking way they should be allowed to sell this shit next to Bob Marley posters and SpongeBob bongs.”  *** I love opiates.  Starting at 20, we had an on-again-off-again relationship for a little while until my whole life went to shit, but like any boy’s first love, I think about them from time to time and wonder how they’re doing. I loved them from the moment I tried my first vicodin in ninth grade. I was more or less the perfect poster child for the D.A.R.E. program. Weed was fine, and booze was fun, but what I really wanted was something that would make me almost die in total bliss. I was trying to turn my brain off.  At their best, opiates are a hug from a cherished, estranged old friend. A blanket fresh from the dryer on a cool winter’s eve. Sunlight that you can see even with your eyes closed, a warm orange hue that envelops the backs of your eyelids as you crest a hill to find the clearest, coolest, bluest oasis thine own eyes have ever seen.  At their worst, like anything in life that feels too good, they’ll eventually take everything from you. Yes, even _that_. And sooner rather than later you’re at a meeting in some rec center, repeating the serenity prayer through gritted teeth in a room full of people all doing the same. It’s a thief. They’re relief on a loan with one hell of an interest rate.  Much like a fresh-faced new quarterback, opiates have a long history of being hailed as a miracle then cursed as a scourge. At the turn of the nineteenth century, a Prussian chemist isolated chemicals in opium and created the first synthetic: morphine. Roughly a hundred years later, German chemists working at Bayer refined morphine into heroin (around the same time they invented aspirin) and began to mass market it as a wonder drug that was safer than morphine and even a cure for addiction. In reality, it was six times more powerful.  Sound familiar?  About 30 years ago, Purdue Pharma introduced OxyContin — with another opium synthetic, oxycodone, wrapped in a time-release coating and multitudes stronger than its Percocet predecessor — and aggressively marketed it as a safe and easily accessible painkiller to doctors offices across the country. Sales reps promised a cure-all for every type of pain: a leg lost in a lathe accident or headaches from being a housewife. Then addictions and overdoses skyrocketed into what the [Department of Justice](https://www.justice.gov/opa/pr/justice-department-announces-global-resolution-criminal-and-civil-investigations-opioid) called “a national tragedy.” Now more than a million people in the U.S. have an [opioid use disorder](https://www.hhs.gov/opioids/statistics/index.html), and the drug is nearly impossible to get — [even for cancer patients](https://www.cancer.gov/news-events/cancer-currents-blog/2020/opioids-cancer-pain-oncologists-decreasing-prescriptions). Though the feds have managed to squeeze some money out of Purdue for drug treatment programs, the opioid crisis has been called a [colossal policy failure](https://opioids.stanford.edu/north-american-opioid-crisis-case-study-multi-system-regulatory-failure) with no end in sight. It is a very American thing to sell a “miracle” to gullible, desperate people — and then, in an act of mercy, take it away from them and tell them to figure the rest out as they writhe sick and sweating alone on the floor. This overcorrection and refusal to treat addicts like human beings has opened the floodgates for fly-by-night companies to ply their mystery wares. The response to the unstoppable force of Texans’ desire to get fucked up has meant big bucks for shady companies looking to capitalize on the former while skirting the wrath of the state.  This has created a not-so-black market where you can buy [legal “weed](https://www.statesman.com/story/news/state/2024/04/19/delta-8-texas-thc-delta-9-safe-fda-weed-marijuana-laws/73368546007/),” trip the fuck out on psychedelic [mushrooms](https://www.dallasobserver.com/news/psychedelic-we-tripped-on-magic-mushroom-gummies-18513383) without fear of jail, and even get [addicted to what scientists compare to “legal morphine.”](https://www.tampabay.com/investigations/2023/12/09/tampa-bay-times-tested-20-kratom-products-heres-what-we-found/) All can be found at gas stations and vape stores across the state.  Enter: a new wave of synthetic opiates. Hustlers and hucksters have miraculously found a way to make a buck peddling knockoffs of the stuff the state has deemed too dangerous. Certain substances like tianeptine, AKA [“gas station heroin,”](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10444703/) are in a legal gray space — illegal to sell and market because they’re not Food and Drug Administration-approved (the [agency has issued warnings](https://www.fda.gov/consumers/health-fraud-scams/tianeptine) against tianeptine products) but not a federally controlled substance. Calls to poison control centers and reported deaths from tianeptine have gone up, and [crackdowns](https://www.justice.gov/usao-nh/pr/arizona-company-and-ceo-sentenced-illegal-distribution-tianeptine-and-other-drugs-and) have ensued, so the invisible hand of the market got to work and started throwing stuff in the bathtub to see what would stick. [7-Hydroxymitragynine](https://pmc.ncbi.nlm.nih.gov/articles/PMC6598159/) stuck like fucking glue. Mitragynine is a main compound in kratom and breaks down into 7-hydroxymitragynine when ingested, according to the [National Institute on Drug Abuse](https://nida.nih.gov/research-topics/kratom#affect-body). Though not approved by the FDA, kratom has been used for opioid withdrawal symptoms. Both mitragynine and 7-OH affect the brain like codeine or morphine; they activate biochemical pathways that elicit pain relief and affect mood. Hydroxie is just one brand you can find in vape stores, gas stations, and liquor stores all across the state of Texas, as well as other 7-OH tablets called hyDROXYS, Press’d, BLOOS, and my personal favorite: PERKS.  The story of how 7-OH came to flood vape shops and gas stations across the country is a bit murky. Despite [being identified 30 years ago](https://www.thieme-connect.de/products/ejournals/abstract/10.1055/s-2006-959578) by scientists at Chiba University, it only truly [became popular with consumers in the last year](https://onlinelibrary.wiley.com/doi/10.1111/add.16728?af=R).  Despite its trace presence in raw kratom leaf, 7-OH is synthetically derived from kratom [and is incredibly addictive](https://www.aboutlawsuits.com/kratom-class-action-lawsuit-alleges-ingredients-are-as-addictive-as-opioids/). Because of a lack of federal oversight, users have [no idea what they’re getting or how much they’re taking](https://www.tampabay.com/investigations/2023/12/09/tampa-bay-times-tested-20-kratom-products-heres-what-we-found/). The [Texas Legislature](https://www.kxan.com/news/texas-politics/texas-legislature-passes-bill-to-make-kratom-safer-for-consumers/) [passed a bill](https://capitol.texas.gov/tlodocs/88R/analysis/html/HB00861H.htm#:~:text=Multiple%20states%20have%20passed%20laws,Health%20and%20Safety%20Protection%20Act.) in 2023 that requires manufacturers to register their products, set limits for the level of 7-hydroxymitragynine, and restrict use of synthetics.  In July, the [Global Kratom Coalition](https://globalkratomcoalition.org/) sent a letter to Texas Attorney General Ken Paxton warning of the dangers of concentrates and 7-OH abuse. According to the coalition’s letter, an independent lab detected illegal levels of 7-OH found in products sold at various vape stores around Dallas and in Collin County.  “We’re concerned that kratom, in many cases, is no longer kratom,” said the executive director of the coalition, Matthew Lowe, in an interview with [_The Dallas Morning News_](https://www.dallasnews.com/news/2024/10/02/kratom-advocate-says-illegal-synthetic-products-are-being-sold-in-north-texas/)_._ Lowe told the newspaper about the rise of 7-OH abuse over the past 18 months and the work he has done to better understand it. “The regulatory environment is a little bit gray at this point in time,” he added. “You’ve also got a situation where the innovation, in and outside the kratom industry, in isolated synthetic products is increasing at a really, really fast pace.”   “We’re seeing it everywhere,” Lowe told the newspaper. Some business owners want better regulations on the products, and the Food and Drug Administration has said there is inadequate information [about kratom](https://www.fda.gov/news-events/public-health-focus/fda-and-kratom) to “provide reasonable assurance that such ingredient does not present a significant or unreasonable risk of illness or injury.” The agency says it has not approved any prescription or over-the-counter drug products containing kratom or its two main chemical components, mitragynine and 7-hydroxymitragynine. Kratom is illegal in six states, but most — like Texas — have lagged behind legislating these rapidly changing drugs.  Although these substances are fairly new, they have already wreaked havoc among addicts and former addicts who are looking for ways to curb cravings. An estimated 1.7 million Americans ages 12 and older used kratom in 2021, according to the Substance Abuse and Mental Health Services Administration’s [National Survey on Drug Use and Health](https://www.samhsa.gov/data/sites/default/files/reports/rpt39443/2021NSDUHFFRRev010323.pdf). In a 2023 investigation, the [_Tampa Bay Times_](https://project.tampabay.com/investigations/deadly-dose/kratom-overdose-deaths-florida-mitragynine-testing/) found 580 people died in Florida from kratom-related overdoses and that people with a history of drug use accounted for the majority of kratom-only overdoses. [Reddit communities](https://www.reddit.com/r/Quittingfeelfree/) also have popped up featuring horror stories of addiction, overdose, relapse, and financial ruin.  I am a year into cycling between detox and retox with 7-OH. Something I told myself a long time ago I would never do. Sitting here writing this, I am, for about the sixth time, trying to taper off the synthetics and kratom concentrates. From experience, I can tell you that while the withdrawals aren’t exactly on par with pharmaceutical opiates, they are terrible and very difficult to manage, especially as the prevalence of these drugs increases and their availability becomes impossible to ignore. Imagine being addicted to heroin and you can just go to 7-Eleven to pick up a Little Debbie and some Dilaudid. This is not a projection of my own addictive personality attempting to regulate the behavior of others, nor is it intended to be a scare tactic designed to shame people or drive them away from this stuff. Bad drug policies open up spaces for hucksters and hustlers to fill the gaps that broken people often fall through.  You can throw a fat sleeping Pokémon character on a soft-pack of pills and call it natural, but that doesn’t make it so.  *** This backroom bathtub operation doesn’t stop at opiates. Hell, this is Texas, brother. The last bastion of freedom. In the Lone Star State, life, liberty, and the pursuit of happiness are made manifest in day-to-day life. Texans are free to be [executed at rates higher](https://tcadp.org/get-informed/texas-death-penalty-facts/) than residents of any other state. It is our God-given right to dole out death as we see fit, even if the [evidence doesn’t support](https://tcadp.org/stop-executions/#RobertRoberson) the state’s decision to turn a guy into worm food. Let God sort ’em out.  Texans, being outdoor-loving, wild-at-heart, roamers of the rugged plains, are free to live and die outside, as assistance dries up and already strained services see a spike in homelessness, particularly among [veterans and families](https://www.texastribune.org/2024/01/11/texas-homelessness-estimate/). You have the right to work yourself silly for wages determined by your boss, [who understands what’s best for you](https://www.keranews.org/news/2022-09-13/texas-is-one-of-the-worst-states-in-the-country-for-workers-heres-why) more than those pesky unions do.  But even the streets of Heaven have a few potholes. Not everything is free here in Texas.  Texas has some of the [strictest drug laws in the country,](https://www.nonstopjustice.com/blog/drug-laws-in-texas/) and the most powerful man in the state intends to make them [a lot worse](https://thebarbedwire.com/2024/12/05/the-most-powerful-man-in-texas-really-wants-to-ban-thc/). The bell of liberty rings loud as hell when it comes to [owning a kangaroo](https://knue.com/texas-exotic-animal-pets/), but if you want to spark up — or enjoy a nice beach day with a head full of mushrooms — you will not collect $200, you will collect suffering.  I don’t particularly care for weed. Haven’t since high school. That being said, I think as one of the biggest and most populated states in the country, we should have followed the [will of the masses](https://news.gallup.com/poll/514007/grassroots-support-legalizing-marijuana-hits-record.aspx) and made it legal 10 years ago and been done with it.  Nixon’s War on Drugs, like many Great American Wars, was sold as something that was going to make American lives better and easier, but was really done as a way to justify policing communities that the government felt needed a stern hand — [in this case Black Americans, leftists, and anti-war protestors](https://www.forbes.com/sites/eriksherman/2016/03/23/nixons-drug-war-an-excuse-to-lock-up-blacks-and-protesters-continues/). About half of the country, over the last 20 years or so, has done its best to undo the mess done by administrations run by Puritans. But not Texas. We march forever onward, heads held high, noses turned upward at those who find themselves addicted, strung out, and destitute; and we do the same for people just looking to have a good time. When it comes to drug possession and use, forgiveness and compassion is for the birds. This is Texas. Culturally, it’s considered a moral failing to use drugs. It is a moral failing to suffer under a cruel and neglectful society, basically. We are duty-bound as Christians to expedite your journey to Hell. And by God, if I catch you smoking legal hemp, I am going to [throw your ass in the slammer myself,](https://www.texastribune.org/2023/02/22/texas-delta-8-marijuana-hemp-arrests/) then promptly [throw the evidence in the nearest dumpster](https://southcoastsafeaccess.com/san-antonio-police-threw-thc-products-in-school-dumpsters). *** By letting a murky black market of drugs thrive, we’re only hurting real people. What is there to be done?  Decriminalization, regulation, and rehabilitation is hard, I agree. Especially in our political world, where only the biggest dumpster fires get attention.  I don’t really know what the solution is, but I do know that the current state of affairs, like many things in this country, was created to punish certain groups, exploit others, and enrich some of the worst people on Planet Earth. I also know that addiction is one of those things that affects everyone, but not everyone has the resources to beat it.  To many, it is sacrilege to suggest another course of action that is empathetic in its approach as opposed to punitive, but regulation might be that answer. The worst people in the world are having the time of their lives while some of the best people I know pawn tools for mystery pills sold next to beer bongs.  If we want to truly be the last frontier of freedom, the last bastion of Bubbas on the wild plains, we should take a look at the ways that we box sick people into cycles of suffering, and then we should crucify the people responsible.  Also we should stop selling fake heroin at the gas station.  *** Tagged: [CBD](https://thebarbedwire.com/tag/cbd/), [drugs](https://thebarbedwire.com/tag/drugs/), [Marijuana](https://thebarbedwire.com/tag/marijuana/), [Mushrooms](https://thebarbedwire.com/tag/mushrooms/), [Opioids](https://thebarbedwire.com/tag/opioids/), [TB1](https://thebarbedwire.com/tag/tb1/), [TB2](https://thebarbedwire.com/tag/tb2/), [TB3](https://thebarbedwire.com/tag/tb3/), [THC](https://thebarbedwire.com/tag/thc/) [![Avatar photo](https://thebarbedwire.com/wp-content/uploads/2024/12/cropped-CFDC02B3-9724-400F-8C8C-56995C8BD22E-80x80.jpg)](https://thebarbedwire.com/author/jake-rhodes/) ## [Jake Rhodes](https://thebarbedwire.com/author/jake-rhodes/) Jake Rhodes is a podcaster and comedian from San Marcos, Texas. As a writer, he has covered everything from the local punk scene in Austin to predatory loansharks in the State of Texas. If you can stand... [More by Jake Rhodes](https://thebarbedwire.com/author/jake-rhodes/) © 2025 The Barbed Wire [Powered by Newspack](https://newspack.com/) >>> 1092 / 3 364.0 >>> 0.029834721237421036 * 100.0 2.9834721237421036 >>> 0.031025748699903488 * 61.23 1.8997065928950905 >>> 0.181362 * 20 3.62724 >>>