The Carter administration proposed far-reaching legislation yesterday to deregulate the nation's rail freight industry, leaving the railroads almost totally free of federal regulation after five years.

Key Provisions of the rail package would:

Allow railoads freedom to set their prices without governent interference. To avoid sudden dislocations, however, the rate freedom would be phased in over five years during which time the rails annualkly could raise individual rates by seven percent, plus the cost of inflation.

As a means of encouraging company-by-company pricing of services, the rails would lose the ability to effect across-the-board industry-wide rate increases after two years.

Rails would get immediate authority to cut rates without interfence by the Interstate Commerce Commission but could be forced to raise them if an ICC investigation showed the rates to be predatory.

Prohibit the ICC after two years from granting antitrust immunity to rate bureau agreements that provide general rate changes. Joint industry discussions of single line rates would be barred immediately. In addition, when rail representatives got together to jointly discuss rates, they would be required to throw meetings open to the public,

Transfer jurisdication over rail mergers from the ICC to the Justice Department so that rail mergers are subject to the same antitrust law assessments as businesses in other indutries.

Set new guidelines for ICC approval of rail abandonments to assure that railroads are not forced to continue to sever money-losing lines, but also to allow shippers, communities or states to provide subsidies to maintain service.

Overall, the measure seeeks to eliminate or restrict the heavy ICC involvement in the railroads' daily operations.

"Simply stated, it is a bill to save the railroads," Transportation Secretary Brock Adams said at a White House briefing to unveil the measure.

"This industry is strugging for survival under the burden of regulations over 100 years old." he said. As a result, the railroads find themselves losing business each year to other modes of transportation and facing a shortfall of $16 billion needed by 1985 to pay for equipment, track and debt repayment.

Last year, the overall rate of return on investment of rt industry was less than 1 percent. Lifting regulation to allow the rails to "compete and try to save themselves' is the object of the bill, he said.

Stuart E. Eizenstat, assistant ot the president for domestic affairs and policy, said the legislation "provides the only way out of enormous increases in federal budget expenditure to keep America's railorada afloat."

"Whithout these changes to create the right climate, the industry will not be able to pull out of its long decline," he said.

In his meassage to Congress, President Carter complained that $2.5 billion of federal funds are needed each year just to maintain the current rail system and that more would probably be required after 1985.

"Dergeulation presents the only viable option to either massive increases in federal subsidides to the railroads or increased government intervention in their operation -- both of which are highly undesirable," he said.

Both Rep. James Florio (D-M.J.), chairman of the House surface transportation subcommittee, and Sen. Howard W. Cannon (D-New.), chairman of the Senate Commerce Committee, pledged diligent and imediate consideration of the rail packeage.

Although leaders of the rail industry applauded the goals of the rail package, they were less than enthusiastic about some of its details.

William H. Dempsey. President of the Association of American Railroads, the railroads' primary trade associtation, said "some very singificant changes and additions" to the proposal would be necessary to move the industry toward significant financial stability. He called some provisions "clearly harmful" to the industry.

He singled out for criticism the proposals to cut back the industry's ability to imnpose general rate increases and to alter the existing rate bureau operations. He also complained that rail mergers should be facilitated and not have to run "a traditional antimerger gauntlet." In addition, he said, the rail abandonments provision is too strict.