Sylvia Walker and James Lanigan were 8 when they entered special classes - both San Francisco school children, both black. They had problems with their vision, speech and hearing. They also had low intelligences test scores. They were classified as mentally retarded.

Darryl Lester went in to the classes for the retarded at age 9. Michael Sears went in at 7 and John Harvey went in at 8, despite school officials' suggestions that both might be brighter than indicated by their IQ tests. The California school system gave to each of these children the label Educatable Mentally Retarded (EMR), and transferred them into classes designed for children with a limited capacity to learn.

Now Lester and the other four students have become the plaintiffs in a class action lawsuit that is chalenging the whole concept of IQ testing to identify retarded students, calling it scientifically sanctioned segregation. In closing arguments yesterday, attorneys for the students concluded 5 1/2 months of arguing before U.S. District Court Judge Robert Peckham by requesting a permanent ban - one that would apparently set a nationwide precedent - on the use of "culturally and racially biased" intelligence tests in student placement.

The accusation of cultural bias is one that intelligence test supporters have fought for the last 10 years. They said that the tests serve as useful predictors of students' later achievement in school and that the tests are no more culturally biased than the society in which the children will have to function. California school officials have stuck by that agrument throughout this case saying, as one official put it an interview recently, "there are very bright kids in our society and there are very slow kids in our society . . . it's not the tests that make them that way. I'm not sure it does the kids any good not to predict that, and then just flunk them after the fact."

"They do not tell you what the mental ability of the child is . . . they're not diagnostic treatments . . . they're not appropriate for curriculum design," Palmer Madden, an attorney with the San Francisco law firm of Public Advocates Inc., argued yesterday. At Madden's side, resting against an easel, a large graft illustrated the disparity between black and white test scores nationwide. It is a gap of 10-to-15 points that has been debated for the last decade and is the foundation of this case.

The lawsuit began in 1971, in the wake of national concern over black students' low scores on intelligence tests. Black children in San Francisco made up 66 percent of the EMR enrollment, although only 28.5 percent of the school district was black. Statewide, black students - 9.1 percent of the entire enrollment - made up 27.5 percent of the enrollment in EMR classes.

That disparity has lessened over the years, partly because a 1972 court order for San Francisco to temporarily stop using IQ tests for EMR placement, pending the outcome of this lawsuit. That restraint was later extended statewide, so that in 1975 California education officials placed a moratorium still in effect, on the use for EMR placement decisions of the Stanford-Binet, the Weschler Adult Intelligence Scale, the Weschler Pre-School and Primary Scale of Intelligence, the Leiter International Performance Scale of Intelligence, the Leiter International Performance Scale, and 12 other supplemental tests.

Madden cited early 20th century reports that on the basis of IQ tests, most immigrants were stupid (one tester reported feeble minds in 79 percent of immigrant Italians, 83 percent of Jews, and 87 percent of Russians). "Nobody today would test an Italian who had just come over to this country" in English, Madden argued - and yet grading black children, particularly those of ghetto backgrounds - on the basis of current IQ tests, Madden said, amounts to the same thing.

In addition to seeking a permanent end to the use of intelligence tests in EMR placement, the attorneys for the children want an end to the disproportionate placement of minorities in EMR classes statewide, and they want court-supervised reevaluation (without IQ tests) of all students in EMR classes.

They said that they are not after the total banning of intelligence tests. They said that the question of whether gifted children should be given the tests is not at issue.

Joanne Condas, the attorney from the state attorney general's office who has conducted the defense in this case, argued that each of the plaintiffs was properly placed in an EMR class - that each was, in fact, mildly retarded, and that "they were put in with good teachers and smaller classes . . .. The time they spent in the EMR program is patently a great benefit to them."

When Judge Peckham asked her whether finding that the students had been adequately placed would invalidate the lawsuit - and the charges of statewide disparity in EMR placement - Condas replied, "I don't see how it could go on, your honor . . . There really are no plaintiffs in this case, as far as I'm concerned."

School officials, including state superintendent of public instruction Wilson Riles, who is black, have defended the state's EMR placement procedure, saying the IQ test is only one of a number of tools used to evaluate schoolchildren. "How do you have benchmarks? You don't throw out the instruments if someone misuses them."

Riles and other officials point out that there is an appeals procedure for parents, that the behavior and achievement tests of children are also studied before making an EMR placement, and that school policy calls for yearly reevaluation of EMR-tracked students. The children's attorneys have produced several studies in the course of the trial, however, showing that in many cases reevaluation and referral information that did not come from IQ tests were ignored.

However throughout this case has been the highly controversial theory of a handful of researchers who claim that blacks may be less intelligent than whites as a result of genetic deferences. Attorneys for the children have accused the state of giving this theory official sanction by sending so many black children to the EMR classes - as many as 10,000 may be in those classes by mistake, the attorneys have said. Defense attorney Condas, while insisting that the state does not support the theory of genetic inferiority, told Judge Peckham earlier in the trial, "It is just that I want the court to address the question with an open mind rather than with the assumption that all men are basically equal, and that means equal in intelligence. I don't feel that this is the kind of case where the court should start with that as a fixed principle."

Louis M. Thrasher, special counsel for litigation of civil rights with the Justice Department, testified yesterday on behalf of the plaintiffs, calling the state EMR referral history "a practice of classifying, assigning, and segregating black children in public schools in the state of California," and a violation of the 14th Amendment of the Constitution and the 1964 Civil Rights Act.