Grueling as it was, the torture that Congress inflicted on itself in hammering out a budget compromise last week pales by comparison with the task ahead: making it stick.

Not only has President Reagan indicated that he will ignore it in vetoing tax and spending bills he regards as excessive, but there also is no guarantee that Congress can follow through on what the budget promises, especially tax increases to chip away at huge federal deficits expected to last through the 1980s.

Senate Finance Committee Chairman Robert J. Dole (R-Kan.) adamantly opposed the budget's requirement for $73 billion in tax increases over the next three years and said, shortly after the Senate joined the House in approving the budget Thursday night, that he sees no way his committee can meet the target.

Dole's lack of enthusiasm for the tax provisions is shared by House Ways and Means Committee Chairman Dan Rostenkowski (D-Ill.).

Even if their committees can produce the required tax legislation by the July 22 deadline imposed by the budget, and even if Congress passes that legislation, there is little chance of a two-thirds vote in both houses to override a veto.

On spending, the budget targets are expected to produce less congressional anguish because the budget's call for a slowdown of Reagan's military buildup and for easing social welfare spending appears to reflect political realities on Capitol Hill.

But, in what many legislators see as a warm-up for the 1984 campaign, Reagan appears eager to battle Congress on spending bills, at least half of which, incorporating most of the budget's discretionary spending, are believed to be veto-prone.

The odds may favor Reagan, at least on domestic spending: he needs to muster only a one-third-plus-one vote in one house to make a veto stick.

As the president himself indicated in campaigning publicly against the budget compromise, its passage could strengthen Congress' hand in any veto confrontation by giving advance legitimacy to the congressional spending numbers. Some lawmakers have suggested that it also might give Reagan greater pause in vetoing bills especially popular with Congress, although the White House hardly missed a beat Friday in renewing its veto vows.

On military spending, where the administration wants more than Congress is prepared to provide, the budget is especially helpful to Congress in reining in Pentagon spending initiatives it opposes. Defense Secretary Caspar W. Weinberger indicated as much in adamant opposition to the budget, although he is expected to continue pressing for the roughly $12 billion in spending authority that he lost in the budget.

On domestic spending, however, even though a clear majority may favor all of the money allowed by the budget, votes on appropriations bills this year indicate that it will be difficult, if not impossible, for Congress to override a veto.

Moreover, Senate Majority Leader Howard H. Baker Jr. (R-Tenn.), who reluctantly broke with Reagan to help pass the budget compromise, has made clear that he will side with Reagan on veto fights over appropriations bills, regardless of whether they comply with that budget.

A successful veto strategy could force Congress to shave spending below its budget targets to gain enactment of its regular appropriations bills. Or, as has happened more often in recent years, it could lead to an omnibus "continuing resolution" as the new fiscal year approaches on Oct. 1, with the government held hostage as Congress and the White House attempt to stare each other down over stopgap spending levels.

The fiscal discipline required this year is considerably less than that in earlier Reagan-era budgets. Last year, Congress approved a three-year package of nearly $100 billion in tax increases and more than $30 billion in spending cuts. By contrast, the budget for fiscal 1984 calls for only $12 billion in mandatory spending cuts, and the $73 billion in tax increases, over three years.

Even on taxes, Dole indicated in Senate debate that he might be able to swallow $59 billion if given more time and flexibility to consider deeper spending cuts, which appeared to narrow the debate to $14 billion over three years--not much by federal budget standards.

Budget Committee Chairman Pete V. Domenici (R-N.M.) made it clear that specific annual increases, starting with $12 billion for next year, need not be followed precisely if the cumulative total is achieved, opening the door for compromise on the immediate tax increases Reagan so vehemently opposes.

Moreover, Domenici has said, the big tax increase envisioned by 1986 could be made contingent, as Reagan himself had proposed in his embrace of standby taxes for the late 1980s.

A major reason for the jitters is congressional apprehension that, although a bipartisan centrist coalition in Congress finally prevailed on the budget, Reagan may have walked away with the political prize: a chance to run against a Congress labeled as a big-taxing, big-spending threat to economic recovery.

Lawmakers who supported the budget compromise argued that the differences were marginal, involving mainly the mix of domestic and military spending, but conceded that a climate may exist in which Reagan gets the benefit of the doubt.

Domenici lost no time after the Senate's budget vote in noting that the compromise actually anticipates slightly less spending over the next three years than Reagan's budget.

Other Republicans and Democrats noted that Reagan proposed nearly $60 billion in tax increases over three years, mostly in standby taxes for 1986--not much less than Congress' $73 billion for that period.

Almost lost in Thursday's debate was perhaps the most telling number of all. The national debt, which broke the trillion-dollar mark in 1981, will hit $1.6 trillion next year. By 1986, it is expected to top $2 trillion, doubling in five years.