When the Senate finished rewriting the nation's criminal laws last week - an enormous undertaking that produced a decade of acrid debate between liberals and conservatives - the ritual paeans of praise and selfcongratulation were sung well into the night.

"Truly landmark legislation . . . never before in the 200-year history of the nation . . . extraordinary achievement," intoned the bill's genuinely proud floor managers and principal advocates as they pumped one another's hands and slapped each othrs backs.

Sen. James B. Allen (D-Ala.), who had literally held the bill hostage for his demands to stiffen the federal laws, seemed almost embarrassed by the tributes that poured forth for his having let the Senate vote.

Sen. William L. Scott (R-Va.), who tried to hold the bill hostage, was profusely thanked by Majority Leader Robert C. Byrd (D-W.Va.) for retreating from his earlier insistence that the death penalty be restored.

But as the euphoria of the night gave way to the harsh light of day, and the soothing balm of hyperbole yielded to the drone of new business, the Senates 382-page bill faced new - and irritating - hurdles in the House.

With no small measure of under-statement, House Judiciary Committee Chairman Peter W. Rodino Jr. (D-N.J.) said last week, "This doesn't necessarily mean we'll take the Senate bill as it is."

Rodino, while predicting that up or down House action will occur this session, said, "It isn't going to be easy . . . There are some problem areas, and we have a responsibility to focus where there is controversy."

The object of all the attention was S-1437, an overhaul of criminal laws that, among other things, would severely restrict the most awesome power given to judges - the discretion in passing sentences an criminals.

If passed, the legislation will be the first consolidtion of a confusing jumble of laws that Congress has seattered through the statute books in two centuries of legislative activity.

At the least, the new code reduces volumes of archaic - and often contradictory - legal definitions to a streamlined and understandable package.

From a broader perspective, the code eliminates a disparate range of penalties that seem at each extreme to bear little relationship to the crime. For example, a bank robber may now receive anything from release on probation to 25 years; a rapist may walk from the courtroom with a suspended sentence, or face death in the electric chair.

The linchpin of the bill is the creation of a new federal sentencing commission to write sentencing guidelines for various crimes with prison terms nearly as fixed as possible.

The maximum term under the guidelines could not exceed the minimum by more than 25 percent, and judges would be expected to stick to the guidelines or explain their departures in writing. Moreover, if judges sentenced outside the guidelines, appeals could be taken by either the defense or the prosecution.

Also, parole would be phased out, except in exceptional circumstances, and time off for good behavior would be reduced from one-third of the sentence to 10 percent or less.

The new code, in fact, calls into question the broad philosophy of institutional rehabilitation, under which prisons in America ostensibly have functioned since the turn-of-the-century prison reform movement.

Since criminal law in America is largely a state rather than a federal responsibility, the vast majority of law enforcement will not be affected by passage of the code.

But the bill's supporters point out that state legislatures traditionally have followed the lead of federal statutes, and the proposed code is regarded as a bellwether for provincial revisions.

Little wonder, then, that Senate approval of the bill moved its sponsor, Sen. Edward M. Kennedy (D-Mass.), to say last week, "It will be one of the greatest legislative feats of modern times."

The difficulty in the House will be putting together the kind of fragile compromise worked out between Kennedy, representing the liberal viewpoint, and the late Sen. John L. McClellan (D-Ark./. representing the conservatives on teh Judiciary Committee.

Preceding that compromise - when the highly controversial S-1 criminal code bill was being reworked - a coalition existed between the late Sen. Philip Hart (D-Mich.) and former Sen. Roman Hruska (R-Neb.).

Kennedy was able to maneuver the successor bill through the Judiciary ommittee and the Senate floor by holding together the unusual coalition. Lending him help was McClellan and, later, Sen. Strom Thurmond (R-S.C.), minority floor manager of the measure.

Theodore Voorhees, dean of Catholic University's law school and one of the architects of the bill when he served on the 1966 National Commission on Reform of Federal Criminal Laws, alluded to that delicate coalition last week:

"The House members must try to carry on this compromise . . . If they don't, it all will be lost."

Equally important, according to Voorhees and former California Gov. G. (Pat) Brown, chairman of the commission, is the emergence of a strong leader to carry the bill through the Judiciary Committee and the House floor.

The most often named candidates are Rep. James R. Mann (D-S.C.), chairman of the subcommittee on criminal justice (although he is retiring this year), and Rep. Robert Kastenmeier (D-Wis.), if he can be talked into the job.

In any case, the bill will face more formidable lobbying opposition in the House than it did in the Senate.

Organized civil libertarians, distressed at some of the code's provisions, pulled in their horns during the Senate deliberatiosn because they counted noses and discovered they didn't have the votes to force modifying amendments, according to American Civil Liberties Union Washington director John Shattuck.

Shattuck and other civil liberties leaders said the House will be another matter.

"They've made substantial improvements, and we're not out to kill the bill. But we will attempt to eliminate some of the elements that are damaging to civil liberties," Shattuck said.

The most objectionable features, Shattuck said:

A solicitation provision under which a person could be convicted for encouraging someone else in what he or she believes to be a legal activity, such as protesting the draft. The solicitation offense should at least require an overt act and be limited to serious felonies, the ACLU argues.

A preventive detention provision which permits federal judges to deny bail to defendants charged with certain violent crimes.

Obstructing a government function by interference, a provision civil libertarians say would prohibit virtually any strike, demonstration or picketing activity near a federal facility.

An espionage provision that the ACLU says retains language used in the 1973 indictment of Daniel Ellsberg for disclosing the Pentagon Papers. The code does not require proof of intent to injure the national defense, according to civil libertarians.

Antiriot provisions which make it a crime to give commands, instructions or directions in furtherance of a "riot" - a definition the ACLU says could be used in any peaceful demonstration.

Shattuck said that while the sentencing provisions have been improved by Senate floor amendments, the bill still contains "dangerous features," such as the government right to appeal reduced sentences, cutbacks in "good time off" allowances and the subjugation of parole and other release mechanisms.

The ACLU and other civil liberties groups, including the National Committee Against Repressive Legislation, plan to offer and lobby for numerous amendments they say will tone down the harshness of the bill.

The kind of lobbying - coupled with pressure from conservatives to make the bill even tougher - is likely to put considerable pressure on many House members.

Thurmond alluded to this pressure last week when he described the Senate vote.

"Some people opposed it because they are running for reelection this year, and if there was one thing that they didn't like about the bill they voted against it rather than take a chance," Thurmond said.

In any case, Judiciary Committee hearings will begin in about two weeks, Rodino said, and the Justice Department already is preparing to counteract the ACLU's lobbying effort.

"Nothing is as important as this," said Attorney General Griffin B. Bell, adding that the criminal code is the department's top legislative goal this year.

He predicted that the measure could go to a conference committee by June or July, a forecast that prompted some smiles among the civil libertarian opponents.

"You can't predict who is going to line up on either side of the issue. That's one of the frustrating things about this bill," Shattuck said.

"But I find it hard to believe it will be voted this session," he added.