text stringlengths 81 47k | source stringlengths 59 147 |
|---|---|
Question: <p>When someone tells a computer scientist that a CPU is, say, 32 bits, what all does he/she infer from this information?</p>
<p>I know that it means that the physical address has 32 bits. This meas that the physical memory can't hold more that 2^32 bytes of RAM. This also means that the word size is 32 bit ... | https://cs.stackexchange.com/questions/63001/what-all-can-be-said-when-you-say-that-the-cpu-is-32-bit |
Question: <p>I was asked the next question in my homework assignment:
I just want to make sure that I fully understand what it is that's required of me.
Am I asked to find an algorithm which decides if the language that's accepted by the PDA is finite? And if not, then what is it? Any initial intuition?</p>
<p>**I don... | https://cs.stackexchange.com/questions/75673/providing-an-algorithm-for-a-given-pda |
Question: <p>In the below image, the graph is being triangulated (added edges are in red). My question is simple :<br>
<strong>Is the red edge between nodes 7 and 10 necessary in order to obtain a chordal graph?</strong></p>
<p><a href="https://i.sstatic.net/AXKEV.png" rel="nofollow noreferrer"><img src="https://i.sst... | https://cs.stackexchange.com/questions/109141/chordal-graph-question |
Question: <p>I found this question on the net and I'm wondering what is the process for answering such questions? I assume there is some formula that works for all graphs?</p>
<p><strong>1.a.</strong>
Consider the undirected graph with vertices $A$, $B$, $C$, $D$, $E$, $F$ and edges $AB$, $AC$, $BD$, $CE$, $DF$ and $... | https://cs.stackexchange.com/questions/29038/how-to-figure-out-the-minimal-number-of-colors-needed-to-color-specific-given-gr |
Question: <p>Is there a linear time online version of the preprocessing RMQ algorithm? That is, an algorithm that allows to update the data structure when appending additional elements at the end of the input array in O(1) (worst case or amortized) time per element (while still allowing answering arbitrary queries in c... | https://cs.stackexchange.com/questions/130850/is-there-an-online-preprocessing-algorithm-for-range-minimum-queries-rmq |
Question: <p>Context: I am a clinical psych researcher dabbling in machine learning.</p>
<p>Humans cannot be truly random. Therefore, could machine learning be used to analyze a string of numbers and determine the probability that said string was generated by a human or by a computer? Taking it a step further, could ma... | https://cs.stackexchange.com/questions/136928/could-ai-be-used-to-detect-when-a-human-is-picking-survey-response-options-rando |
Question: <p>Answering <a href="https://cstheory.stackexchange.com/q/48527/61557">my question</a> <a href="https://cstheory.stackexchange.com/users/3532/yonatan-n">Yonatan N</a> said a statement from which follows that there are computable functions of quantum time complexity strictly above polynomial.</p>
<p>According... | https://cs.stackexchange.com/questions/136178/is-there-a-concept-of-probabilistic-quantum-computers |
Question: <p>I'm looking for interesting open questions in complexity theory that someone with an undergraduate degree in math and comp/sci could theoretically tackle. I have strong interest in the polynomial hierarchy, and the study of probabilistic classes like RP, co-RP, ZPP, BPP, and also their logarithmic counterp... | https://cs.stackexchange.com/questions/48552/looking-for-interesting-unanswered-questions-within-complexity-theory-for-a-proj |
Question: <p>The following is the Problem 1.4 in [1]:</p>
<p><strong>Finding an Eulerian path.</strong> Show that if a connected graph has two vertices of odd degree and we start at one of them, Fleury's algorithm will produce an Eulerian path, and that if all vertices have even degree, it (Fleury's algorithm) will pr... | https://cs.stackexchange.com/questions/113122/a-question-about-fleurys-algorithm |
Question: <p>I wish I could think of a better way to word my question. Maybe some one here could offer s suggestion for that, as well.</p>
<p>On to my question. Before I do, this is a class question that has been asked, answer, and considered to be over; however, I'm struggle accepting the answer. For this reason, I'm... | https://cs.stackexchange.com/questions/29900/showing-that-tournament-sort-requrires-on-log-n-comparisons |
Question: <p>I am doing a research about the load balancing problem in 5G system, but I am not sure if my problem is a NP-complete problem.</p>
<p>The problem is:</p>
<ul>
<li>given a set of n items and a set of m knapsack</li>
<li>capacity of knapsacks are equal</li>
<li>the weight of item j in knapsack i is w[i][j]... | https://cs.stackexchange.com/questions/109775/multiple-knapsack-problem-with-equal-profit-and-different-weight |
Question: <p>I'm going through a video of EDX course which talks about Big O notation. At the end of the video they have some questions but the <span class="math-container">$O(n^2)$</span> answer is confusing me. It feels like a mistake, but I just want to make sure.</p>
<p>The question is :</p>
<blockquote>
<p>Imagine... | https://cs.stackexchange.com/questions/87328/question-regarding-on2-efficiency |
Question: <p>I've been working on a developing a product selection network for my workplace. I work with lots of chemicals and the clients don't always know what they want/need so most of the time I have to ask a bunch of question, collect useful/ignore useless information, then make a selection from there. Discussions... | https://cs.stackexchange.com/questions/72018/algorithm-selection-for-classification-problem |
Question: <p>I am doing some past exam papers and I found two interesting questions which I cannot answer due to them not being extensively covered in the lecture notes given to me by my lecturer. </p>
<p>The questions go like this:</p>
<blockquote>
<p><strong>"Explain the mechanism a SIMD computer uses to support ... | https://cs.stackexchange.com/questions/86154/if-and-while-statements-within-a-simd-architecture-and-its-memory-architectu |
Question: <p>No more information required. I would just like to know how to use the information provided.</p>
<p><a href="https://i.sstatic.net/xIOZk.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/xIOZk.png" alt="enter image description here"></a></p>
Answer: <p>4 bits page number + 8 bits offset = 12... | https://cs.stackexchange.com/questions/123912/how-can-the-4-bit-page-number-and-8-bit-offset-as-well-as-the-page-table-be-used |
Question: <p>The original question I am answering:</p>
<blockquote>
<p>Can you use SAT solvers to solve problems complete in <span class="math-container">$\Sigma_2^P,\Pi_2^P,\Delta_2^P$</span>?</p>
</blockquote>
<p>My first thought:</p>
<ul>
<li>Venn Diagrams show that the PH encloses NP, but does not equal NP. Therefo... | https://cs.stackexchange.com/questions/139188/sat-solvers-for-use-in-pnp-and-npnp |
Question: <p>Is there any comparative study that showcases the powers of Bayesian Networks and Deep learning in their respective favorable setup and how they compare?</p>
<p>I tried to go through blogs but couldn't find out any experimental study where the respective models where described based on a example?</p>
<p>... | https://cs.stackexchange.com/questions/60390/comparative-study-between-deep-neural-nets-and-bayesian-networks |
Question: <p>I've been asked a question about B+ Tree.</p>
<p><strong>The question is:</strong> Suppose we have object of the following type:</p>
<p><code>class Obj {
private:
int value;
int key;
public:
Obj(int uniq_key , int value)
}</code></p>
<p>and I am creating a Generic B+ tree which will sort obj... | https://cs.stackexchange.com/questions/86155/return-a-key-of-a-node-with-maximum-value-within-a-range-of-keys-in-b-tree |
Question: <p>This question was asked and answered but I cannot understand the solution.</p>
<ol>
<li>Why is it sufficient to test all strings of |Q| + 1 length?</li>
<li>Why should special state q be found?</li>
</ol>
<p>the original question:
<a href="https://cs.stackexchange.com/questions/43892/show-that-the-set-of... | https://cs.stackexchange.com/questions/127098/decider-for-a-question-not-clear |
Question: <p>My question is about the paper <a href="http://ceur-ws.org/Vol-2936/paper-06.pdf" rel="nofollow noreferrer">Ensembling Ten Math Information Retrieval Systems</a>.</p>
<p>I am interested in the task of finding answers.</p>
<p>Which of the ten system are able to answer questions using <strong>only</strong> d... | https://cs.stackexchange.com/questions/144236/a-question-about-the-paper-ensembling-ten-math-information-retrieval-systems |
Question: <p>I'm dealing with a BIP question, that represents a graph problem.
The goal is finding the graph problem.</p>
<p>I've spend a lot of time trying to solving this question but I couldn't find the answer to that question.</p>
<p>All I'm given is the set of constraints and the objective function:</p>
<p>I'd ... | https://cs.stackexchange.com/questions/51377/binary-integer-programming-question-what-graph-problem-is-represented |
Question: <p>I am a computer science under graduation student, and was going through some Go Back N ARQ (Computer Networking) videos on YouTube, and got a doubt in a question, which according to me should have a different answer than what the instructor on the video is arriving at (given that no other comment in the co... | https://cs.stackexchange.com/questions/59724/go-back-n-arq-question |
Question: <p>I'm a beginner in the coq proof assistant, so sorry if my question is silly. I would like to prove properties of a mathematical object. For clarity I will describe an over-simplified version of my object. Intuitively, the object has
three sets A, B, C. The list A is of the form
$$A= \{(0,x_1) (0,x_2), ...... | https://cs.stackexchange.com/questions/32707/simple-question-coq |
Question: <p>"If we consider the squares of an infinite chess board as nodes of our graph and consider each to be connected to the other eight squares that are a knight's move away from it what is the percolation threshold of this graph?"</p>
<p>Note:One way I have thought about this problem is to try to use vectors: ... | https://cs.stackexchange.com/questions/47992/how-would-i-simulate-a-network-to-explore-the-percolation-threshold-of-a-network |
Question: <p>Hey I had this question and am stuck on part (b).</p>
<p>I don't see how its possible to find a graph with 7 vertices and 15 edges that does <strong>not</strong> have the half-clique problem. If there is a way, could someone share their thought process rather than the answer as I would like to figure it ou... | https://cs.stackexchange.com/questions/159653/half-clique-property-question |
Question: <p>I was reviewing for my CS class and came across this question and answer combo that didn't have any explanation why it was correct. I'm confused on how they got the answer:</p>
<blockquote>
<p>We have a system to which we can instantaneously add and remove cores
-- adding more cores never leads to slowdown... | https://cs.stackexchange.com/questions/139303/analyzing-parallel-performance-question |
Question: <p>This is a <a href="https://cs.stackexchange.com/questions/156721/example-of-progress-and-preservation-failing-in-a-commonly-used-programming-lang">follow-up question to my previous question</a></p>
<p>I have been reading <a href="https://medium.com/hackernoon/java-is-unsound-28c84cb2b3f#.xs8voadvf" rel="no... | https://cs.stackexchange.com/questions/156781/example-of-preservation-failing-in-java-follow-up-question |
Question: <p>I am interested in any research that reviews the state of affairs when it comes to browsers today, be it their concurrency models, their performance, or anything relevant to such topics. Specifically, I am interested in whether any effors are being taken in academia to take on the shortcomings of browser d... | https://cs.stackexchange.com/questions/57152/are-there-any-research-papers-rethinking-browser-architecture |
Question: <p>I have been asked this question, but don't know how to go about answering it. </p>
<p>Three process, which are implementing Lamport's clocks, are running and a lot of events are taking, place including some messages being sent between the processes. The arrows and circles represent in-processor events and... | https://cs.stackexchange.com/questions/126393/finding-the-timestamps-of-processes-implementing-lamports-clocks |
Question: <p>I'd like to expand on this question : </p>
<p><a href="https://stackoverflow.com/questions/52420788/why-does-the-a-star-algorithm-need-gn">https://stackoverflow.com/questions/52420788/why-does-the-a-star-algorithm-need-gn</a></p>
<p>Dijkstra's algorithm uses cost function <span class="math-container">$f(... | https://cs.stackexchange.com/questions/114842/coefficients-in-cost-function-in-a-star |
Question: <p>I have a homework question that is as follows:</p>
<p><em>L(P) is a language of ASCII input strings for which a given program, P, returns "yes". Is the set of all input strings P decidable, such that P is a decision program and L(P) is decidable?</em></p>
<p>My intuition leads me to believe that ... | https://cs.stackexchange.com/questions/140104/a-question-on-decidability |
Question: <p>This is what I got for the in-order of the bst but it's wrong because I'm answering some questions about some successors of some of the letters and I got them wrong. so I'm wondering where in this in-order i've gone wrong? <a href="https://i.sstatic.net/VRRAB.jpg" rel="nofollow noreferrer"><img src="https:... | https://cs.stackexchange.com/questions/115218/in-order-of-binary-search-tree |
Question: <p>I am struggling with this question as I am not sure whether the answer that has been provided is correct or not. The image should be sufficient to tell the question.
<br>The attached image is of the answer. For the question, imagine all but the first two columns are empty.<a href="https://i.sstatic.net/7Y0... | https://cs.stackexchange.com/questions/155996/help-with-a-question-on-write-through-and-no-write-allocate-in-caches |
Question: <p>I'm wondering if there are any $NP$-hard problems which are ``polynomial" in the average case. I think there are two ways to interpret this?</p>
<ul>
<li>If $P \neq NP$, can there be an algorithm solving an $NP$-hard problem with amortized (average case) running time of $O(n^k)$ for a constant $k$?</li>
<... | https://cs.stackexchange.com/questions/28466/can-an-np-hard-problem-be-polynomial-on-average |
Question: <p>How do you formally invalidate a question about the decidability of a partial halting problem solver that answers correctly with the following kind of input: Turing machines that don't use the partial halting problem solver inside?</p>
<p>I made this question and it was marked as unclear. I deleted it. Th... | https://cs.stackexchange.com/questions/78057/formal-invalidation-of-question-about-self-referential-partial-halting-problem-s |
Question: <p>an access sequence of cache block address of length N and contaons n unique addresses. The no. of unique block address between 2 consecutive accesses to the same block address is bound above by k. What is miss ratio if access sequence is passed through a cache of associativity A >= k exercising LRU replace... | https://cs.stackexchange.com/questions/68701/associativity-question-computer-organization |
Question: <p>I recently had a software engineering exam, and there's a particular question that's causing some confusion between my professor and me. I'd like to get some insights from the community to better understand this issue. If I can convince my professor I was right, I could get a higher grade.</p>
<p>The Quest... | https://cs.stackexchange.com/questions/161912/question-regarding-design-constraints-in-software-engineering-exam |
Question: <p>I'm working on solving the question answered at this page but with different values at the table, my alphabet is {a,b,c}
<a href="https://cs.stackexchange.com/questions/1467/words-that-have-the-same-right-and-left-associative-product">Words that have the same right- and left-associative product</a></p>
<p... | https://cs.stackexchange.com/questions/49755/how-to-remember-nfas-choice-on-a-certain-computation |
Question: <p>Question from <em>Artificial Intelligenge: A Modern Approach</em> by Russell and Norvig (Exercise 2.1).</p>
<blockquote>
<p>Suppose that the performance measure is concerned with just the first
$T$ time steps of the environment and ignores everything thereafter.
Show that a rational agent's action m... | https://cs.stackexchange.com/questions/14351/rational-agent-question-from-russell-and-norvig |
Question: <p>I know this is not a question answer posting site but for the sake of explaining my doubt I will like to post a question</p>
<blockquote>
<p>Let <span class="math-container">$A$</span> be a <span class="math-container">$regular$</span> <span class="math-container">$language$</span> and <span class="math... | https://cs.stackexchange.com/questions/119254/regular-language-context-free-language |
Question: <p>There's a floating point question that popped up and I'm confused about the solution. It states that</p>
<blockquote>
<p>IEEE 754-2008 introduces half precision, which is a binary
floating-point representation that uses 16 bits: 1 sign bit, 5
exponent bits (with a bias of 15) and 10 significand bits. This ... | https://cs.stackexchange.com/questions/140115/half-precision-floating-point-question-smallest-non-zero-number |
Question: <p>On my lecture note it was written that "Finding a clique of size <span class="math-container">$k$</span> in a graph is NP".</p>
<p>Later in an example for reduction the following was written:</p>
<p>"Assume we know how to answer "Is there a clique of size <span class="math-container">$k$</span> in a grap... | https://cs.stackexchange.com/questions/119801/is-k-clique-np-hard |
Question: <p>I cannot understand solution to the problem 5.5 in "<strong>Computer Systems: Programmers Perspective</strong>". I this chapter it cover microarchitecture based optimizations and data path dependency. As a reference it uses this reference machine:
<a href="https://i.sstatic.net/bZHZVFpU.png" rel=... | https://cs.stackexchange.com/questions/171698/question-about-data-path-dependencies-in-a-program |
Question: <p>I found en excercise asking this question.
I know that for proving the equivalence of NFAs and DFAs we can use the conversion through subsets, and that for proving the equivalence of nondeterministic TMs and deterministic ones we can build a 3-tape deterministic TM M which emulates the steps of a given non... | https://cs.stackexchange.com/questions/114808/why-is-it-not-possible-to-prove-the-equivalence-of-nondeterministic-and-determin |
Question: <p>OK, so here is a question from a past test in my Theory of Computation class:</p>
<blockquote>
<p>A useless state in a TM is one that is never entered on any input string. Let $$\mathrm{USELESS}_{\mathrm{TM}} = \{\langle M, q \rangle \mid q \text{ is a useless state in }M\}.$$
Prove that $\mathrm{US... | https://cs.stackexchange.com/questions/636/a-question-relating-to-a-turing-machine-with-a-useless-state |
Question: <p>I passed by this question in a previous exam while studying for the "Automata / Theory Of Computation" and I am struggling to find answer. I would appreciate it if someone can help me with it:</p>
<p>This is the question:</p>
<p>a)On the basis of what was covered in class, draw the Venn diagram represent... | https://cs.stackexchange.com/questions/119421/need-help-with-previous-automata-theory-of-computation-exam-question |
Question: <p>Is the $L$ = { $<M>$, $M$ is a DFA accepting all strings except finitely many. }
decidable ?<br><br> I am sort of confused about the question - what exactly does $M$ accept. How are those finitely many strings look like for a particular $DFA$? It is known that $DFA$ accepts infinite number of strings... | https://cs.stackexchange.com/questions/88036/l-m-m-is-a-dfa-accepting-all-strings-except-finitely-many |
Question: <p>The question goes something like this:</p>
<p>Suppose you are living in a country where coins have values that are powers of p, V = [1, 3, 9, 27]. How do you think the dynamic programming and greedy approaches would compare?</p>
<p>Intuitively I want to answer that DP will be faster because greedy runs t... | https://cs.stackexchange.com/questions/64900/question-regarding-coin-change-algorithm-dp-and-greedy |
Question: <p>I have a question about predicate logic. Suppose we have the following predicates:</p>
<p>$\text{Study}(x,y)$: x studies y</p>
<p>$\text{Comp}(x)$: x is a computing student</p>
<p>I want to encode the following sentence in predicate logic: "Some, but not all computer students study logic."</p>
<p>A pot... | https://cs.stackexchange.com/questions/21512/logic-question-why-is-this-an-implication |
Question: <p>Looking at <a href="https://youtu.be/WyAtOqfCiBw?t=1m45s" rel="nofollow noreferrer">this</a> video starting at 1:45, the author claims to be using a second-order approximation for a Markov text generation. He has one letter which he outputs followed by another letter which tells him which state to go to - ... | https://cs.stackexchange.com/questions/77465/second-order-markov-text-generation |
Question: <p>In generating reports, sometimes there is a need to produce quite involved phrases in one of natural languages given numerical or boolean parameters.</p>
<p>To get a feel of it, it is enough to take a look at <a href="https://stackoverflow.com/questions/8982163/how-do-i-tell-python-to-convert-integers-int... | https://cs.stackexchange.com/questions/67772/phrase-generation-approaches |
Question: <p>Hi fellow computer scientists,</p>
<p>I just began my journey to the world of ML and NLP so please bear with me. I'm hoping to find some guidance here. I would be very grateful if anyone could point me in the right direction (reading materials, lectures, specific algorithms, tools, etc.) for solving the f... | https://cs.stackexchange.com/questions/66309/advice-needed-nlp-and-ml-where-to-start |
Question: <p>I have a question ive not been able to explain, and I still cant find the answer looking through computer history. I want to know how the first letters were programmed into the first computer.</p>
<p>Let me explain more..</p>
<p>So when i research computer history they discuss the machines and how they w... | https://cs.stackexchange.com/questions/91344/how-did-the-first-computer-model-display-text |
Question: <p>I'm planning to implement a lexical analyzer by either simulating NFA or running DFA using the input text. The trouble is, the input may arrive in small chunks and the memory may not be enough to hold one very long token in the memory.</p>
<p>Let's assume I have three tokens, "ab", "abcd" and "abce". The ... | https://cs.stackexchange.com/questions/97374/how-to-implement-a-maximal-munch-lexical-analyzer-by-simulating-nfa-or-running-d |
Question: <p>I'm performing some correlation assessment à la NIST <a href="https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-90B.pdf" rel="nofollow noreferrer">Recommendation for the Entropy Sources Used for Random Bit Generation</a>, § 5.1. </p>
<p>You take a test sequence and compress it with a... | https://cs.stackexchange.com/questions/114998/is-there-any-scenario-whereby-randomly-shufflying-a-sequence-improves-its-compr |
Question: <p>For a while, all classification tasks in natural language processing were based on simple RNN's, which operate in a very word-by-word order. Adding gating mechanisms increased ability to "look back", and the newer addition of context vectors which can train attention to different words during the task hav... | https://cs.stackexchange.com/questions/99987/are-there-any-neural-nlg-systems-which-dont-generate-in-left-to-right-order |
Question: <p>Currently, I am working on a research project where I will utilise reinforcement learning for the diversified top-<span class="math-container">$k$</span> clique search problem. To train the reinforcement learning algorithm, I need to generate graphs that have similar properties, such as average degree and ... | https://cs.stackexchange.com/questions/146645/generating-graphs-with-partially-overlapping-cliques |
Question: <p>I am reading the paper <a href="http://research.microsoft.com/en-us/um/people/akenn/sml/CompilingWithContinuationsContinued.pdf" rel="nofollow"><em>Compiling with Continuations, Continued</em></a>, and in section 2.4, <em>Comparison with ANF</em>, the author draws attention to the fact that ANF is not clos... | https://cs.stackexchange.com/questions/41051/what-does-it-mean-to-be-closed-under-beta-reduction |
Question: <p>I am reading this text and it is making absolutely no sense to me. It as if it assumed I will understand. Not to mention the writer apparently had a book made and his grammar is poor. Some of the plain English sentences do not even make sense or have the letter s on the end of words where they should not b... | https://cs.stackexchange.com/questions/32347/help-understanding-formal-language-notation |
Question: <p>Suppose one has a couple of <em>.wav</em> files with English spoken words, multiple ones for each word, and for each such set there exists a transcription of their right output, the pronunciation as <em>ascii text</em>.</p>
<p>As far as I know, machine learning neural networks use arrays of floats as inpu... | https://cs.stackexchange.com/questions/11720/how-is-sound-input-and-output-data-converted-to-use-with-machine-learning-networ |
Question: <p>I am currently studying triangular mesh generation in 2D and, in that connection, the Delaunay triangulation of a list of vertices <span class="math-container">$\{ v_1, v_2, ..., v_N \}$</span>. The divide and conquer algorithm of Lee & Schachter (from their paper "Two Algorithms for Constructing ... | https://cs.stackexchange.com/questions/152993/computing-the-unique-triangles-and-edges-from-vertex-connectivity-of-a-delaunay |
Question: <p>I am implementing the techniques described in the classic <a href="https://www.cis.upenn.edu/~bcpierce/papers/lti.pdf" rel="noreferrer">Local Type Inference</a> paper. Specifically, I am implementing the type argument synthesis algorithm from section 3.</p>
<p>My algorithm seems to mostly work, but it doe... | https://cs.stackexchange.com/questions/73831/local-type-argument-synthesis-when-type-variable-does-not-appear-in-arguments |
Question: <p>Actuality I work in computer vision, specifically on a problem known as "scene graph modeling." This problem aims to convert an image <span class="math-container">$I$</span> in a graph <span class="math-container">$G=(V,E)$</span> where the nodes <span class="math-container">$V$</span> represent the object... | https://cs.stackexchange.com/questions/112767/how-to-transform-an-arbitrary-graph-into-a-fixed-vector-representation |
Question: <p>I would like to propose an open problem at the intersection of computational complexity, pseudorandomness, and circuit theory. This problem has potential implications for cryptography, AI model analysis, and the theory of explainability in stochastic systems.</p>
<p><strong>Informal formulation</strong></p... | https://cs.stackexchange.com/questions/171777/open-problem-structural-learnability-of-pseudo-random-boolean-circuits |
Question: <h1>Constrained Puzzle Generation:</h1>
<p>Let us say a sudoku puzzle is generated with the following procedure:</p>
<ol>
<li>Gather a sequence input of 9 unique numbers in the range <span class="math-container">$[1 .. 9]$</span>. Call it <span class="math-container">$S$</span>.</li>
<li>Map <span class="ma... | https://cs.stackexchange.com/questions/107183/will-this-algorithm-always-solve-a-constrained-sudoku-puzzle-in-quadratic-time |
Question: <p>Is there an efficient method of sampling an n-choose-k combination at random (with uniform probability, for example)?</p>
<p>I have read <a href="https://cs.stackexchange.com/questions/79555">this question</a> but it asks for generations of all combinations, not combinations at random.</p>
<p>I general I... | https://cs.stackexchange.com/questions/104930/efficient-n-choose-k-random-sampling |
Question: <p>Is there a way to choose my custom vocabulary in T5-model while fine-tuning for a text summarization task?</p>
<p>I tried using a sentencepiece model to create my custom tokenizer but the model predicted some tokens which was not present in my tokenizer and hence the tokenizer takes it as an unknown token.... | https://stackoverflow.com/questions/62519413/t5-model-custom-vocabulary |
Question: <p>Does anyone know if it is possible to use the T5 model with hugging face's mask-fill pipeline? The below is how you can do it using the default model but i can't seem to figure out how to do is using the T5 model specifically? </p>
<pre><code>from transformers import pipeline
nlp_fill = pipeline('fill-ma... | https://stackoverflow.com/questions/61408753/using-the-t5-model-with-huggingfaces-mask-fill-pipeline |
Question: <p>I am training a T5 model using Simple transformers and that is giving keyError:'target_text'
what could be The probable cause of it and how can I solve this?
here is my code</p>
<pre><code> !pip install SimpleTransformers
import logging
import pandas as pd
df=pd.read_csv('/content/Vastu - Sheet1 (... | https://stackoverflow.com/questions/72880981/keyerror-target-text-while-training-a-t5-model-using-simple-transformers |
Question: <p>I am looking to convert flan-T5 model downloaded from Hugging face into onnx format and make inference with the same.</p>
<p>My input data is the <strong>symptoms of disease</strong> and expected output is the <strong>Disease name</strong></p>
<pre><code>from transformers import AutoTokenizer, AutoModelFor... | https://stackoverflow.com/questions/78483209/error-while-converting-google-flan-t5-model-to-onnx |
Question: <p>I am using the T5 model found on Hugging Face for text summarization. How can I output the logits of the T5 model directly given a text input for generation purposes (not training)?</p>
<p>I want to generate the outputs token by token so that I can calculate the entropy of each output token, respectively. ... | https://stackoverflow.com/questions/73314467/output-logits-from-t5-model-for-text-generation-purposes |
Question: <p>Does anyone know if HuggingFace's T5 model (small) comes with mono-language vocabulary? The T5 paper by Google indicates that their vocabulary is trained on English and 3 other languages. Is there a version of this vocabulary that contains English only vocabulary? </p>
Answer: <p>When looking at the publi... | https://stackoverflow.com/questions/61880247/does-huggingfaces-t5-model-vocabulary-include-english-only-version |
Question: <p>I want to use the Hugging Face T5 model to do summarization but I want to train the model with my own dataset.</p>
<p>How can I get the T5 model such that it has not been trained yet? And what steps do I need to take to train it?</p>
<p>Currently I am look at this tutorial:
<a href="https://huggingface.co/... | https://stackoverflow.com/questions/74267006/hugging-face-t5-model-that-is-not-pre-trained-and-training-it |
Question: <p>I want to build a classification model that needs only the encoder part of language models. I have tried Bert, Roberta, xlnet, and so far I have been successful.</p>
<p>I now want to test the encoder part only from T5, so far, I found encT5 <a href="https://github.com/monologg/EncT5" rel="noreferrer">https... | https://stackoverflow.com/questions/71788825/using-the-encoder-part-only-from-t5-model |
Question: <p>I have trained a T5 model on a specific dataset for the purpose of keyword extraction. I wish to use Allen NLP Interpret to know various saliency mappings for the inputs given to my model. Where do I make changes such that I can use the package.</p>
Answer: <p>The AllenNLP guide has a chapter on interpret... | https://stackoverflow.com/questions/69527860/how-to-use-allennlp-interpret-on-finetuned-t5-model |
Question: <p>I have fine-tuned the T5-base model (from hugging face) on a new task where each input and target are sentences of 256 words.
The loss is converging to low values however when I use the <code>generate</code> method the output is always too short.
I tried giving minimal and maximal length values to the meth... | https://stackoverflow.com/questions/74981011/t5-model-generates-short-output |
Question: <p>I'm finetuning a t5-base model following <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/master/examples/translation.ipynb#scrollTo=ZwZDgY-0DbrD" rel="nofollow noreferrer">this notebook</a>.
However, the loss of both validation set and training set decreases very slowly. I chan... | https://stackoverflow.com/questions/71607360/how-to-properly-finetune-t5-model |
Question: <p>I've successfully used the <a href="https://huggingface.co/transformers/model_doc/bert.html" rel="nofollow noreferrer">Huggingface Transformers BERT model</a> to do sentence classification using the <a href="https://huggingface.co/transformers/model_doc/bert.html#bertforsequenceclassification" rel="nofoll... | https://stackoverflow.com/questions/62561471/huggingface-gpt2-and-t5-model-apis-for-sentence-classification |
Question: <p>I was working on the optimization of the T5 model I separated the model into encoder and decoder and converted them to ONNX using Nvidia TensorRT repo <a href="https://github.com/NVIDIA/TensorRT/tree/main/demo/HuggingFace" rel="nofollow noreferrer">https://github.com/NVIDIA/TensorRT/tree/main/demo/Hugging... | https://stackoverflow.com/questions/71049114/making-prediction-from-encoder-and-decoder-of-t5-model-without-using-generate-me |
Question: <p>I know that T5 has K, Q and V vectors in each layer. It also has a feedforward network. I would like to freeze K, Q and V vectors and only train the feedforward layers on each layer of T5. I use Pytorch library. The model could be a wrapper for huggingface T5 model or a modified version of it. I know how t... | https://stackoverflow.com/questions/71048521/how-to-freeze-parts-of-t5-transformer-model |
Question: <p>I wanted to train the model for spell correction. I trained two models allegro/plt5-base with polish sentences and google/t5-v1_1-base with english sentences. Unfortunately, I don't know for what reason, but both models shorten the sentences.
Example:</p>
<pre><code>phrases = ['The name of the man who was ... | https://stackoverflow.com/questions/72882799/huggingface-why-does-the-t5-model-shorten-sentences |
Question: <p>I want to use the pre-trained T5 model <a href="https://huggingface.co/docs/transformers/model_doc/t5" rel="nofollow noreferrer">https://huggingface.co/docs/transformers/model_doc/t5</a> on the task of Question Answering on the <a href="https://huggingface.co/datasets/boolq" rel="nofollow noreferrer">https... | https://stackoverflow.com/questions/71861922/question-answering-with-pre-trained-model-t5 |
Question: <p>My question is regarding the pre-trained T5 models found on Huggingface. In either case of taking the fully-trained model, or after fine-tuning it, is there an API function for directly downloading the vocabulary?</p>
<p>More specifically, the default <code>vocab_size</code> for T5 is 32128 (<a href="https... | https://stackoverflow.com/questions/77248165/what-does-the-vocabulary-of-a-pre-trained-fine-tuned-t5-model-look-like |
Question: <p>I'm working with the T5 model from the Hugging Face Transformers library and I have an input sequence with masked tokens that I want to replace with the output generated by the model. Here's the <a href="https://huggingface.co/docs/transformers/model_doc/t5#inference" rel="nofollow noreferrer">code</a>.</p... | https://stackoverflow.com/questions/75977316/how-to-use-output-from-t5-model-to-replace-masked-tokens-in-input-sequence |
Question: <p>I am trying to fine-tune a pre-trained T5 model on CNN/DailyMail dataset with the following code:</p>
<pre class="lang-py prettyprint-override"><code>import torch
import torch.nn as nn
import torch.distributed as dist
from torch.nn.parallel import DistributedDataParallel as DDP
from datasets import load_d... | https://stackoverflow.com/questions/76115668/poor-rouge-metric-on-cnn-dailymail-dataset-for-pretrained-t5-model |
Question: <p>I'm trying to perform PEFT with LoRA. I'm using the Google flan-T5 base model. I'm using the Python code below. I'm running the code with an nvidia GPU with 8 GB of ram on Ubuntu server 18.04 LTS. In the Python code I'm loading the public dataset from huggingface. I've loaded the pre-trained flan-T5 model... | https://stackoverflow.com/questions/77334292/perform-peft-with-lora-on-flan-t5-model-causing-no-executable-batch-size-error |
Question: <p>I would like to study the effect of pre-trained model, so I want to test t5 model with and without pre-trained weights. Using pre-trained weights is straight forward, but I cannot figure out how to use the architecture of T5 from hugging face without the weights. I am using Hugging face with pytorch but op... | https://stackoverflow.com/questions/73700165/how-to-use-architecture-of-t5-without-pretrained-model-hugging-face |
Question: <p>I am currently developing a T5 model (encoder-decoder architecture) from scratch for educational purposes. While working on this project, I've encountered some confusion regarding the pre-training objective, specifically the <em>denoising objective</em>. I would like to clarify my understanding and have so... | https://stackoverflow.com/questions/78252488/clarification-on-t5-model-pre-training-objective-and-denoising-process |
Question: <p>i'm trying to convert T5 model to onnx using the <a href="https://github.com/Ki6an/fastT5" rel="nofollow noreferrer">fastT5</a> library, but
getting an error while running the following code</p>
<pre><code>from fastT5 import export_and_get_onnx_model
from transformers import AutoTokenizer
model_name = 't5... | https://stackoverflow.com/questions/66693724/while-exporting-t5-model-to-onnx-using-fastt5-getting-runtimeerroroutput-with |
Question: <p>I'm using fine-tuned T5 model for performing spell checks in my dataset of consisting of reviews. However, I'm facing an issue where the model when performing spell checks does not give entire string as an output or sometimes repeats the phrases of the given review. It is not in large amounts but there do ... | https://stackoverflow.com/questions/79619113/generating-partial-string-as-output-after-fine-tuning-t5-model |
Question: <p>Hello I'm using t5 pretrained abstractive summarization how I can evaluate the summary output accuracy IN short how much percent my model are accurate</p>
Answer: <p>You could use ROUGE Metric as its metric for automatic summarization evaluation.</p>
<p><a href="https://pypi.org/project/rouge-metric/" rel... | https://stackoverflow.com/questions/67345611/abstractive-text-summarization-using-t5-pre-trained-model |
Question: <p>I'm trying to train my model using the following commands:</p>
<pre><code>import numpy as np
import pandas as pd
import os
import pandas as pd
import tensorflow as tf
from transformers import AutoTokenizer, T5ForConditionalGeneration, T5Config
# IMPORT REQUIRED DATASET
path = "/content/train_set.csv... | https://stackoverflow.com/questions/78525690/typeerror-dataloader-object-is-not-subscriptable-t5-model |
Question: <p>I am using T5-Large by HuggingFace for inference. Given a premise and a hypothesis, I need to determine whether they are related or not. So, if I feed a string <code>"mnli premise: This game will NOT open unless you agree to them sharing your information to advertisers. hypothesis: Personal data discl... | https://stackoverflow.com/questions/75028507/determining-the-probability-of-a-sequence-generated-by-t5-model-by-huggingface |
Question: <p>I am trying to modify the T5-model as a sequence labelling task (to do NER).
I create my model class by taking the last hidden states of the T5-model and add a linear layer with 3 out-features (for simple IOB-tags).
Here is my model class:</p>
<pre><code>class Seq2SeqTokenCLS(nn.Module):
def __init__(s... | https://stackoverflow.com/questions/69800263/modifying-t5-for-sequence-labelling |
Question: <p>I am trying to train a t5 conditional Generation model in Sagemaker, its running fine when I am passing the arguments directly in notebook but its not learning anything when I am passing estimator and train.py script, I followed the documentation provided by hugging face as well as AWS. But still we are fa... | https://stackoverflow.com/questions/75055543/aws-sagemaker-t5-or-huggingface-model-training-issue |
Question: <p>I have created a custom dataset and trained on it a custom <code>T5ForConditionalGeneration</code> model that predicts solutions to quadratic equations like this:</p>
<p>Input: <code>"4*x^2 + 4*x + 1"</code>
Output: <code>D = 4 ^ 2 - 4 * 4 * 1 4 * 1 4 * 1 4 * 1 4 * 1 4</code></p>
<p>I need to get... | https://stackoverflow.com/questions/76199989/problem-with-custom-metric-for-custom-t5-model |
Question: <p>I am trying to replicate the example code provided on Langchain website (<a href="https://python.langchain.com/en/latest/modules/models/llms/integrations/huggingface_hub.html" rel="nofollow noreferrer">link here</a>) but I am getting the following error whether I run it on Google colab or locally:</p>
<p><... | https://stackoverflow.com/questions/76209003/googles-flan-t5-models-are-not-loading-on-huggingfacehub-through-langchain |
Question: <p>I'm trying to get reproducible results of T5 transformer model:</p>
<pre><code>import torch
from transformers import T5ForConditionalGeneration,T5Tokenizer
def set_seed(seed):
torch.manual_seed(seed)
if torch.cuda.is_available():
torch.cuda.manual_seed_all(seed)
set_seed(42)
t5model = T5ForCond... | https://stackoverflow.com/questions/64839614/how-to-get-reproducible-results-of-t5-transformer-model |
Question: <p>In the T5 Hugging face code (see for instance <a href="https://github.com/huggingface/transformers/blob/main/src/transformers/models/t5/modeling_t5.py#L341C38-L341C38" rel="nofollow noreferrer">this</a>), it seems that Input is "never normalized", in the following sense : each component outputs :... | https://stackoverflow.com/questions/76760152/why-is-unnormalized-input-added-to-output-in-huggingface-t5-model |
Question: <p>when I use fastt5 library to convert t5-base fine-tune models like "<strong>pszemraj/t5-v1_1-base-ft-jflAUG</strong>", "<strong>pszemraj/grammar-synthesis-base</strong>", fastt5 library <a href="https://i.sstatic.net/YFXQW.png" rel="nofollow noreferrer">Image of error</a> <strong>show t... | https://stackoverflow.com/questions/73163013/how-can-we-optimize-and-quantize-fine-tune-model-of-t5-grammar-correction-like |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.